Skip to content

Commit

Permalink
Upgrade to php 8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
vkhramtsov committed Aug 25, 2022
1 parent 48e0e42 commit f95083f
Show file tree
Hide file tree
Showing 13 changed files with 403 additions and 555 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
steps:
- name: Setup node
run: curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - && sudo apt-get install -y nodejs
- name: Setup php 7.4
- name: Setup php 8.1
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
php-version: '8.1'
extensions: curl, gd, intl, json, mbstring, readline, xml, zip
- name: Setup yarn
run: |
Expand Down
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ cache:
- node_modules

php:
- 7.4
- 8.0
- 8.1

services:
Expand Down
20 changes: 10 additions & 10 deletions Resources/doc/01-installation-dev.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ Add nginx repos:
Install nginx via ``sudo apt-get update && sudo apt-get install -y nginx``


Install PHP 7.4
Install PHP 8.1
~~~~~~~~~~~~~~~
Add repository for php 7.4:
Add repository for php 8.1:

::

Expand All @@ -50,21 +50,21 @@ Add repository for php 7.4:
sudo sh -c 'echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'


Install required php modules ``sudo apt-get update && sudo apt-get install -y php7.4 php7.4-cli php7.4-intl php7.4-xdebug php7.4-mysqlnd php7.4-xml php7.4-mbstring php7.4-zip php7.4-fpm php7.4-curl`` Create and enable ``common.ini``:
Install required php modules ``sudo apt-get update && sudo apt-get install -y php8.1 php8.1-cli php8.1-intl php8.1-xdebug php8.1-mysqlnd php8.1-xml php8.1-mbstring php8.1-zip php8.1-fpm php8.1-curl`` Create and enable ``common.ini``:

::

echo "; priority=99" | sudo tee /etc/php/7.4/mods-available/common.ini > /dev/null
echo "date.timezone=Europe/Minsk" | sudo tee -a /etc/php/7.4/mods-available/common.ini > /dev/null
echo "short_open_tag=0" | sudo tee -a /etc/php/7.4/mods-available/common.ini > /dev/null
echo "xdebug.max_nesting_level=250" | sudo tee -a /etc/php/7.4/mods-available/xdebug.ini > /dev/null
echo "xdebug.var_display_max_depth=5" | sudo tee -a /etc/php/7.4/mods-available/xdebug.ini > /dev/null
echo "; priority=99" | sudo tee /etc/php/8.1/mods-available/common.ini > /dev/null
echo "date.timezone=Europe/Minsk" | sudo tee -a /etc/php/8.1/mods-available/common.ini > /dev/null
echo "short_open_tag=0" | sudo tee -a /etc/php/8.1/mods-available/common.ini > /dev/null
echo "xdebug.max_nesting_level=250" | sudo tee -a /etc/php/8.1/mods-available/xdebug.ini > /dev/null
echo "xdebug.var_display_max_depth=5" | sudo tee -a /etc/php/8.1/mods-available/xdebug.ini > /dev/null
sudo phpenmod common


Open php fpm config file ``sudo mcedit /etc/php/7.4/fpm/pool.d/www.conf``, find ``listen = /run/php/php7.4-fpm.sock`` and replace with ``listen = 127.0.0.1:9000``.
Open php fpm config file ``sudo mcedit /etc/php/8.1/fpm/pool.d/www.conf``, find ``listen = /run/php/php8.1-fpm.sock`` and replace with ``listen = 127.0.0.1:9000``.

Restart ``php-fpm`` using command ``sudo service php7.4-fpm restart``.
Restart ``php-fpm`` using command ``sudo service php8.1-fpm restart``.


Install node.js and Yarn
Expand Down
1 change: 0 additions & 1 deletion Resources/doc/todo.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ Things to do
============

- Add tasks to build to execute tests, when they are appears
- Upgrade ``squizlabs/php_codesniffer`` to version 3 after releasing stable phing version 3
4 changes: 2 additions & 2 deletions bin/deploy-to-prod.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env sh
# We should deploy only build for php 7.4
if [ "${TRAVIS_PULL_REQUEST}" = "false" ] && [ $(phpenv version-name) = "7.4" ]; then
# We should deploy only build for php 8.1
if [ "${TRAVIS_PULL_REQUEST}" = "false" ] && [ $(phpenv version-name) = "8.1" ]; then
eval "$(ssh-agent -s)"
chmod 600 .travis/deploy.key
ssh-add .travis/deploy.key
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
}
],
"require": {
"php": "^7.4.0|^8.0",
"php": "^8.1",
"ext-ctype": "*",
"ext-iconv": "*",
"ext-pdo": "*",
Expand All @@ -31,7 +31,7 @@
"doctrine/doctrine-bundle": "^2.7",
"doctrine/doctrine-migrations-bundle": "^3.2",
"doctrine/orm": "^2.12",
"easycorp/easyadmin-bundle": "^3.1.3",
"easycorp/easyadmin-bundle": "^4.3.4",
"friendsofsymfony/user-bundle": "^3.0",
"owenversteeg/min": "dev-gh-pages#fe73afc9e1a0ae3492ad3af2efeb0f4d47f967cc",
"pear/archive_tar": "1.4.*",
Expand Down
Loading

0 comments on commit f95083f

Please sign in to comment.