diff --git a/INSTALL/INSTALL.rhel7.md b/INSTALL/INSTALL.rhel7.md index d382618..db041f4 100644 --- a/INSTALL/INSTALL.rhel7.md +++ b/INSTALL/INSTALL.rhel7.md @@ -71,8 +71,8 @@ Backend $ mkdir module $ cd module/ - $ ln -s ./../vendor/monarc/core MonarcCore - $ ln -s ./../vendor/monarc/frontoffice MonarcFO + $ ln -s ./../vendor/monarc/core Monarc\Core + $ ln -s ./../vendor/monarc/frontoffice Monarc\FrontOffice Frontend @@ -97,7 +97,7 @@ Update MONARC (including npm config for explicit proxy) Create initial user - $ php ./vendor/robmorgan/phinx/bin/phinx seed:run -c ./module/MonarcFO/migrations/phinx.php + $ php ./vendor/robmorgan/phinx/bin/phinx seed:run -c ./module/Monarc/FrontOffice/migrations/phinx.php # Configure apache (as root) diff --git a/INSTALL/INSTALL.ubuntu1604.md b/INSTALL/INSTALL.ubuntu1604.md index c74d409..fd87764 100644 --- a/INSTALL/INSTALL.ubuntu1604.md +++ b/INSTALL/INSTALL.ubuntu1604.md @@ -90,13 +90,13 @@ Create two symbolic links: $ mkdir module $ cd module/ - $ ln -s ./../vendor/monarc/core MonarcCore - $ ln -s ./../vendor/monarc/frontoffice MonarcFO + $ ln -s ./../vendor/monarc/core Monarc/Core + $ ln -s ./../vendor/monarc/frontoffice Monarc/FrontOffice There are 2 parts: -* MonarcFO is only for front office; -* MonarcCore is common to the front office and to the back office. +* Monarc\FrontOffice is only for front office; +* Monarc\Core is common to the front office and to the back office. ### Frontend @@ -188,7 +188,7 @@ execute the database migration scripts and compile the translations. # Create initial user - $ php ./vendor/robmorgan/phinx/bin/phinx seed:run -c ./module/MonarcFO/migrations/phinx.php + $ php ./vendor/robmorgan/phinx/bin/phinx seed:run -c ./module/Monarc/FrontOffice/migrations/phinx.php The username is *admin@admin.test* and the password is *admin*. diff --git a/INSTALL/INSTALL.ubuntu1804.md b/INSTALL/INSTALL.ubuntu1804.md index 2736b44..81a61ac 100644 --- a/INSTALL/INSTALL.ubuntu1804.md +++ b/INSTALL/INSTALL.ubuntu1804.md @@ -80,19 +80,19 @@ Clone the repository and invoke `composer` using the shipped `composer.phar`: ### Back-end -The back-end is using the Zend Framework. +The back-end is using the Zend Framework 3. Create two symbolic links: $ mkdir module $ cd module/ - $ ln -s ./../vendor/monarc/core MonarcCore - $ ln -s ./../vendor/monarc/frontoffice MonarcFO + $ ln -s ./../vendor/monarc/core Monarc/Core + $ ln -s ./../vendor/monarc/frontoffice Monarc/FrontOffice There are 2 parts: -* MonarcFO is only for MONARC; -* MonarcCore is common to MONARC and to the back office of MONARC. +* Monarc\FrontOffice is only for MONARC; +* Monarc\Core is common to MONARC and to the back office of MONARC. ### Front-end @@ -175,7 +175,7 @@ then update MONARC: # 4. Create initial user - $ php ./vendor/robmorgan/phinx/bin/phinx seed:run -c ./module/MonarcFO/migrations/phinx.php + $ php ./vendor/robmorgan/phinx/bin/phinx seed:run -c ./module/Monarc/FrontOffice/migrations/phinx.php The username is *admin@admin.test* and the password is *admin*. diff --git a/composer.json b/composer.json index 3abe0d3..0693673 100644 --- a/composer.json +++ b/composer.json @@ -17,20 +17,17 @@ "ext-pdo": "*", "monarc/core": "dev-feature/upgrade-to-zf3", "monarc/frontoffice": "dev-feature/upgrade-to-zf3", - "phpoffice/phpword": "dev-stable", + "monarc/phpword": "dev-master", "zendframework/zend-component-installer": "^2.1", "zendframework/zend-mvc": "^3.1", "zendframework/zend-di": "^3.1", "zendframework/zend-permissions-rbac": "^3.0", "zendframework/zend-log": "^2.11" }, + "require-dev": { + "roave/security-advisories": "dev-master" + }, "config": { "bin-dir": "bin/" - }, - "repositories": [ - { - "type": "vcs", - "url": "https://github.com/monarc-project/monarc_phpword" - } - ] + } } diff --git a/config/application.config.php b/config/application.config.php index 562bed4..c8462d0 100644 --- a/config/application.config.php +++ b/config/application.config.php @@ -22,6 +22,7 @@ if (!empty($appConfDir)) { return [ 'modules' => [ + 'Zend\Mail', 'Zend\Log', 'Monarc\Core', 'Monarc\FrontOffice', diff --git a/public/index.php b/public/index.php index 8d74aa5..7b5d849 100644 --- a/public/index.php +++ b/public/index.php @@ -1,6 +1,5 @@ -# Example: ./scripts/client-upgrade-db.sh MonarcBO localhost root derp monarc_backoffice +# Example: ./scripts/client-upgrade-db.sh Monarc/BackOffice localhost root derp monarc_backoffice MODULE=$1 SQLHOST=$2 @@ -11,20 +11,20 @@ SQLBASE=$5 path="" case $MODULE in - "MonarcCore"|"core") - path="module/MonarcCore" + "Monarc/Core"|"core") + path="module/Monarc/Core" if [ ! -d $path ]; then path="vendor/monarc/core" fi ;; - "MonarcFO"|"frontoffice") - path="module/MonarcFO" + "Monarc/FrontOffice"|"frontoffice") + path="module/Monarc/FrontOffice" if [ ! -d $path ]; then path="vendor/monarc/frontoffice" fi ;; - "MonarcBO"|"backoffice") - path="module/MonarcBO" + "Monarc/BackOffice"|"backoffice") + path="module/Monarc/BackOffice" if [ ! -d $path ]; then path="vendor/monarc/backoffice" fi diff --git a/scripts/seed-db.sh b/scripts/seed-db.sh index 1426877..4500a20 100755 --- a/scripts/seed-db.sh +++ b/scripts/seed-db.sh @@ -1,14 +1,14 @@ #!/bin/bash -if [ -d module/MonarcCore ]; then - php ./vendor/robmorgan/phinx/bin/phinx seed:run -c ./module/MonarcCore/migrations/phinx.php +if [ -d module/Monarc/Core ]; then + php ./vendor/robmorgan/phinx/bin/phinx seed:run -c ./module/Monarc/Core/migrations/phinx.php fi -if [ -d module/MonarcBO ]; then - php ./vendor/robmorgan/phinx/bin/phinx seed:run -c ./module/MonarcBO/migrations/phinx.php +if [ -d module/Monarc/BackOffice ]; then + php ./vendor/robmorgan/phinx/bin/phinx seed:run -c ./module/Monarc/BackOffice/migrations/phinx.php fi -if [ -d module/MonarcFO ]; then - php ./vendor/robmorgan/phinx/bin/phinx seed:run -c ./module/MonarcFO/migrations/phinx.php +if [ -d module/Monarc/FrontOffice ]; then + php ./vendor/robmorgan/phinx/bin/phinx seed:run -c ./module/Monarc/FrontOffice/migrations/phinx.php fi diff --git a/scripts/update-all.sh b/scripts/update-all.sh index 3c36902..13db84c 100755 --- a/scripts/update-all.sh +++ b/scripts/update-all.sh @@ -89,19 +89,19 @@ fi currentPath=`pwd` -pathCore="module/MonarcCore" +pathCore="module/Monarc/Core" if [ -d $pathCore ]; then pull_if_exists $pathCore else pathCore="vendor/monarc/core" fi -pathBO="module/MonarcBO" +pathBO="module/Monarc/BackOffice" if [ -d $pathBO ]; then pull_if_exists $pathBO else pathBO="vendor/monarc/backoffice" fi -pathFO="module/MonarcFO" +pathFO="module/Monarc/FrontOffice" if [ -d $pathFO ]; then pull_if_exists $pathFO else @@ -153,7 +153,7 @@ fi if [[ $forceClearCache -eq 1 ]]; then # Clear doctrine cache - # Move to MonarcCore Module.php + # Move to Monarc/Core Module.php $phpcommand ./public/index.php orm:clear-cache:metadata $phpcommand ./public/index.php orm:clear-cache:query $phpcommand ./public/index.php orm:clear-cache:result diff --git a/scripts/upgrade-db.sh b/scripts/upgrade-db.sh index 90edf87..fbafbdf 100755 --- a/scripts/upgrade-db.sh +++ b/scripts/upgrade-db.sh @@ -1,11 +1,11 @@ #!/bin/bash -php ./vendor/robmorgan/phinx/bin/phinx migrate -c ./module/MonarcCore/migrations/phinx.php +php ./vendor/robmorgan/phinx/bin/phinx migrate -c ./module/Monarc/Core/migrations/phinx.php -if [ -d module/MonarcBO ]; then - php ./vendor/robmorgan/phinx/bin/phinx migrate -c ./module/MonarcBO/migrations/phinx.php +if [ -d module/Monarc/BackOffice ]; then + php ./vendor/robmorgan/phinx/bin/phinx migrate -c ./module/Monarc/BackOffice/migrations/phinx.php fi -if [ -d module/MonarcFO ]; then - php ./vendor/robmorgan/phinx/bin/phinx migrate -c ./module/MonarcFO/migrations/phinx.php +if [ -d module/Monarc/FrontOffice ]; then + php ./vendor/robmorgan/phinx/bin/phinx migrate -c ./module/Monarc/FrontOffice/migrations/phinx.php fi diff --git a/scripts/upgrade-url.sh b/scripts/upgrade-url.sh index c796a9e..ded8545 100755 --- a/scripts/upgrade-url.sh +++ b/scripts/upgrade-url.sh @@ -11,9 +11,9 @@ oldurl_if_exists() { oldurl_if_exists . $1 -oldurl_if_exists module/MonarcCore $1 -oldurl_if_exists module/MonarcBO $1 -oldurl_if_exists module/MonarcFO $1 +oldurl_if_exists module/Monarc/Core $1 +oldurl_if_exists module/Monarc/BackOffice $1 +oldurl_if_exists module/Monarc/FrontOffice $1 oldurl_if_exists node_modules/ng_backoffice $1 oldurl_if_exists node_modules/ng_client $1 oldurl_if_exists node_modules/ng_anr $1 diff --git a/vagrant/README.rst b/vagrant/README.rst index 4951b4b..a9adbbb 100644 --- a/vagrant/README.rst +++ b/vagrant/README.rst @@ -26,7 +26,6 @@ MONARC will be automatically deployed in an Ubuntu Bionic Server. $ git clone https://github.com/monarc-project/MonarcAppFO $ cd MonarcAppFO/vagrant - $ export GITHUB_AUTH_TOKEN= $ vagrant up Once the VM will be configured by Vagrant, go to the address diff --git a/vagrant/Vagrantfile b/vagrant/Vagrantfile index aeddcc4..2119b6c 100644 --- a/vagrant/Vagrantfile +++ b/vagrant/Vagrantfile @@ -11,7 +11,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| # Every Vagrant virtual environment requires a box to build off of. config.vm.box = "ubuntu/bionic64" - config.vm.provision :shell, path: "bootstrap.sh", args: "#{ENV['GITHUB_AUTH_TOKEN']}" + config.vm.provision :shell, path: "bootstrap.sh" # Disable automatic box update checking. If you disable this, then # boxes will only be checked for updates when the user runs diff --git a/vagrant/bootstrap.sh b/vagrant/bootstrap.sh index a66c184..4f2fbac 100644 --- a/vagrant/bootstrap.sh +++ b/vagrant/bootstrap.sh @@ -1,8 +1,5 @@ #! /usr/bin/env bash -# Variables -GITHUB_AUTH_TOKEN=$1 - TAG='' PATH_TO_MONARC='/home/ubuntu/monarc' @@ -143,7 +140,6 @@ fi echo -e "\n--- Retrieving MONARC libraries… ---\n" # TODO: Can be removed when we move to packagis. -composer config -g github-oauth.github.com $GITHUB_AUTH_TOKEN composer install -o # Back-end @@ -306,7 +302,7 @@ echo -e "\n--- Update the project… ---\n" echo -e "\n--- Create initial user and client ---\n" -php ./vendor/robmorgan/phinx/bin/phinx seed:run -c ./module/MonarcFO/migrations/phinx.php +php ./bin/phinx seed:run -c ./module/Monarc/FrontOffice/migrations/phinx.php