Applied all the PHP8 required changes.
parent
b7eb17f06b
commit
1e307691bb
|
@ -14,7 +14,7 @@ jobs:
|
|||
strategy:
|
||||
matrix:
|
||||
node-version: [ "16.x" ]
|
||||
php-version: [ "7.4" ]
|
||||
php-version: [ "8.1" ]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
@ -34,7 +34,7 @@ jobs:
|
|||
run: composer validate
|
||||
|
||||
- name: Install PHP dependencies
|
||||
run: composer install --prefer-dist --no-progress --no-suggest --no-dev
|
||||
run: composer install --prefer-dist --no-progress --no-suggest --no-dev --ignore-platform-req=ph
|
||||
|
||||
- name: Symlink Monarc modules
|
||||
run: |
|
||||
|
|
|
@ -40,11 +40,11 @@
|
|||
}
|
||||
],
|
||||
"require": {
|
||||
"php": "^7.4",
|
||||
"php": "^7.4 || ^8.0",
|
||||
"ext-json": "*",
|
||||
"ext-pdo": "*",
|
||||
"monarc/backoffice": "^2.9.7",
|
||||
"monarc/core": "^2.9.15",
|
||||
"monarc/backoffice": "^2.12.6",
|
||||
"monarc/core": "^v2.12.6",
|
||||
"laminas/laminas-mvc": "^3.1",
|
||||
"laminas/laminas-di": "^3.1",
|
||||
"laminas/laminas-permissions-rbac": "^3.0",
|
||||
|
@ -54,7 +54,7 @@
|
|||
"endroid/qr-code": "^4.4"
|
||||
},
|
||||
"require-dev": {
|
||||
"roave/security-advisories": "dev-master"
|
||||
"roave/security-advisories": "dev-latest"
|
||||
},
|
||||
"config": {
|
||||
"bin-dir": "bin/",
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -68,7 +68,7 @@ if [[ $? -eq 1 ]]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
composer install -o --no-dev
|
||||
composer install -o --no-dev --ignore-platform-req=php
|
||||
|
||||
pathCore="module/Monarc/Core"
|
||||
pathBO="module/Monarc/BackOffice"
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
pushd node_modules/ng_backoffice
|
||||
|
||||
if [[ -d po && -f po/template.pot ]]; then
|
||||
for f in po/*.po; do
|
||||
msgmerge --backup=none -U "$f" po/template.pot
|
||||
msgattrib --no-obsolete --clear-fuzzy --empty -o "$f" "$f"
|
||||
done;
|
||||
fi
|
|
@ -10,8 +10,8 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|||
# please see the online documentation at vagrantup.com.
|
||||
|
||||
# Every Vagrant virtual environment requires a box to build off of.
|
||||
config.vm.box = "bento/ubuntu-20.04"
|
||||
config.disksize.size = "50GB"
|
||||
config.vm.box = "bento/ubuntu-22.04"
|
||||
config.disksize.size = "100GB"
|
||||
config.vm.provision "shell", privileged: false, path: "bootstrap.sh"
|
||||
|
||||
# Disable automatic box update checking. If you disable this, then
|
||||
|
@ -55,7 +55,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|||
#
|
||||
# # Use VBoxManage to customize the VM. For example to change memory:
|
||||
vb.customize ["modifyvm", :id, "--memory", "2048"]
|
||||
vb.customize ["modifyvm", :id, "--name", "MONARC BO - Ubuntu 20.04 - DEV"]
|
||||
vb.customize ["modifyvm", :id, "--name", "MONARC BO - Ubuntu 22.04 - DEV"]
|
||||
end
|
||||
#
|
||||
# View the documentation for the provider you're using for more
|
||||
|
|
|
@ -23,8 +23,8 @@ max_execution_time=100
|
|||
max_input_time=223
|
||||
memory_limit=512M
|
||||
|
||||
PHP_INI=/etc/php/7.4/apache2/php.ini
|
||||
XDEBUG_CFG=/etc/php/7.4/apache2/conf.d/20-xdebug.ini
|
||||
PHP_INI=/etc/php/8.1/apache2/php.ini
|
||||
XDEBUG_CFG=/etc/php/8.1/apache2/conf.d/20-xdebug.ini
|
||||
MARIA_DB_CFG=/etc/mysql/mariadb.conf.d/50-server.cnf
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
@ -46,6 +46,7 @@ sudo apt-get -y install vim zip unzip git gettext curl gsfonts > /dev/null
|
|||
|
||||
echo -e "\n--- Install MariaDB specific packages and settings… ---\n"
|
||||
sudo apt-get -y install mariadb-server mariadb-client > /dev/null
|
||||
|
||||
# Secure the MariaDB installation (especially by setting a strong root password)
|
||||
sudo systemctl restart mariadb.service > /dev/null
|
||||
sleep 5
|
||||
|
@ -71,10 +72,13 @@ expect -f - <<-EOF
|
|||
send -- "y\r"
|
||||
expect eof
|
||||
EOF
|
||||
sudo apt-get purge -y expect php-xdebug > /dev/null 2>&1
|
||||
sudo apt-get purge -y expect > /dev/null 2>&1
|
||||
|
||||
echo -e "\n--- Configuring… ---\n"
|
||||
sudo sed -i "s/skip-external-locking/#skip-external-locking/g" $MARIA_DB_CFG
|
||||
sudo sed -i "s/.*bind-address.*/bind-address = 0.0.0.0/" $MARIA_DB_CFG
|
||||
sudo sed -i "s/.*character-set-server.*/character-set-server = utf8mb4/" $MARIA_DB_CFG
|
||||
sudo sed -i "s/.*collation-server.*/collation-server = utf8mb4_general_ci/" $MARIA_DB_CFG
|
||||
|
||||
echo -e "\n--- Setting up our MariaDB user for MONARC… ---\n"
|
||||
sudo mysql -u root -p$DBPASSWORD_ADMIN -e "CREATE USER '$DBUSER_MONARC'@'%' IDENTIFIED BY '$DBPASSWORD_MONARC';"
|
||||
|
@ -82,8 +86,11 @@ sudo mysql -u root -p$DBPASSWORD_ADMIN -e "GRANT ALL PRIVILEGES ON * . * TO '$DB
|
|||
sudo mysql -u root -p$DBPASSWORD_ADMIN -e "FLUSH PRIVILEGES;"
|
||||
sudo systemctl restart mariadb.service > /dev/null
|
||||
|
||||
echo -e "\n--- Installing Apache… ---\n"
|
||||
sudo apt install apache2 -y
|
||||
|
||||
echo -e "\n--- Installing PHP-specific packages… ---\n"
|
||||
sudo apt-get -y install php apache2 libapache2-mod-php php-curl php-gd php-mysql php-pear php-apcu php-xml php-mbstring php-intl php-imagick php-zip php-xdebug > /dev/null
|
||||
sudo apt-get install -y php8.1 php8.1-cli php8.1-common php8.1-mysql php8.1-zip php8.1-gd php8.1-mbstring php8.1-curl php8.1-xml php8.1-bcmath php8.1-intl php8.1-imagic php8.1-xdebug > /dev/null
|
||||
|
||||
echo -e "\n--- Configuring PHP… ---\n"
|
||||
for key in upload_max_filesize post_max_size max_execution_time max_input_time memory_limit
|
||||
|
@ -92,10 +99,10 @@ do
|
|||
done
|
||||
|
||||
echo -e "\n--- Configuring Xdebug for development ---\n"
|
||||
sudo bash -c cat "<< EOF > $XDEBUG_CFG
|
||||
sudo bash -c "cat << EOF > $XDEBUG_CFG
|
||||
zend_extension=xdebug.so
|
||||
xdebug.remote_enable=1
|
||||
xdebug.remote_connect_back=1
|
||||
xdebug.mode=debug
|
||||
xdebug.discover_client_host=1
|
||||
xdebug.idekey=IDEKEY
|
||||
EOF"
|
||||
|
||||
|
@ -138,6 +145,10 @@ mkdir -p $PATH_TO_MONARC/data/DoctrineORMModule/Proxy
|
|||
|
||||
|
||||
# Front-end
|
||||
echo -e "\n--- Installation of Node, NPM… ---\n"
|
||||
curl -sL https://deb.nodesource.com/setup_15.x | sudo bash -
|
||||
sudo apt-get install -y nodejs npm
|
||||
|
||||
mkdir -p node_modules
|
||||
cd node_modules
|
||||
if [ ! -d "ng_backoffice" ]; then
|
||||
|
@ -227,11 +238,6 @@ mysql -u $DBUSER_MONARC -p$DBPASSWORD_MONARC monarc_common < db-bootstrap/monarc
|
|||
mysql -u $DBUSER_MONARC -p$DBPASSWORD_MONARC monarc_common < db-bootstrap/monarc_data.sql > /dev/null
|
||||
|
||||
|
||||
echo -e "\n--- Installation of Node, NPM… ---\n"
|
||||
curl -sL https://deb.nodesource.com/setup_15.x | sudo bash -
|
||||
sudo apt-get install -y nodejs
|
||||
|
||||
|
||||
echo -e "\n--- Adjusting user mod… ---\n"
|
||||
sudo usermod -aG www-data vagrant
|
||||
sudo usermod -aG vagrant www-data
|
||||
|
|
Loading…
Reference in New Issue