Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide support for PHP 8.0 #31

Merged
merged 2 commits into from
May 31, 2021
Merged

Provide support for PHP 8.0 #31

merged 2 commits into from
May 31, 2021

Conversation

ittmann
Copy link
Contributor

@ittmann ittmann commented Nov 10, 2020

Adds support for PHP 8.0 as requested in #27

  • composer.json already doesn't support PHP less than 7.3
  • composer.json currently does not require-dev phpunit
    (it is installed during initial project creation when MVC testing support is installed as described in README.md)
  • no .travis.yml is present

Tested in docker with php:8.0-rc-apache
The skeleton app is compatible/runs without any issues.

phpunit reports an error on the use of the deprecated function libxml_disable_entity_loader in laminas-test, which should be fixed when PHP 8.0 support is added to laminas-test

 composer run test
> phpunit
PHPUnit 9.4.2 by Sebastian Bergmann and contributors.

Warning:       Your XML configuration validates against a deprecated schema.
Suggestion:    Migrate your XML configuration using "--migrate-configuration"!

.E.                                                                 3 / 3 (100%)

Time: 00:00.028, Memory: 10.00 MB

There was 1 error:

1) ApplicationTest\Controller\IndexControllerTest::testIndexActionViewModelTemplateRenderedWithinLayout
Function libxml_disable_entity_loader() is deprecated

/var/www/vendor/laminas/laminas-dom/src/Document.php:234
/var/www/vendor/laminas/laminas-dom/src/Document.php:159
/var/www/vendor/laminas/laminas-dom/src/Document/Query.php:45
/var/www/vendor/laminas/laminas-test/src/PHPUnit/Controller/AbstractHttpControllerTestCase.php:386
/var/www/vendor/laminas/laminas-test/src/PHPUnit/Controller/AbstractHttpControllerTestCase.php:411
/var/www/vendor/laminas/laminas-test/src/PHPUnit/Controller/AbstractHttpControllerTestCase.php:434
/var/www/vendor/laminas/laminas-test/src/PHPUnit/Controller/AbstractHttpControllerTestCase.php:451
/var/www/module/Application/test/Controller/IndexControllerTest.php:48

ERRORS!
Tests: 3, Assertions: 6, Errors: 1.
Script phpunit handling the test event returned with error code 2

Signed-off-by: Dick Ittmann <dick.ittmann@gmail.com>
@DIReports DIReports mentioned this pull request Nov 10, 2020
@froschdesign froschdesign linked an issue Dec 8, 2020 that may be closed by this pull request
6 tasks
@froschdesign
Copy link
Member

@ittmann

phpunit reports an error on the use of the deprecated function libxml_disable_entity_loader in laminas-test, which should be fixed when PHP 8.0 support is added to laminas-test

libxml_disable_entity_loader is used in laminas-dom and this supports now PHP 8.

@gennadiylitvinyuk gennadiylitvinyuk mentioned this pull request Mar 19, 2021
6 tasks
@samsonasik
Copy link
Member

this may need laminas-skeleton-installer to support php 8 first, ref laminas/laminas-skeleton-installer#19

@samsonasik
Copy link
Member

samsonasik commented Apr 15, 2021

@ittmann please update laminas/laminas-skeleton-installer require to ^0.3 in composer.json. Thank you.

@samsonasik samsonasik added this to the 1.2.0 milestone Apr 16, 2021
composer.json Outdated Show resolved Hide resolved
composer.json Outdated Show resolved Hide resolved
"laminas/laminas-component-installer": "^2.4"
"laminas/laminas-skeleton-installer": "^0.3"

Signed-off-by: Dick Ittmann <dick.ittmann@reports.nl>
@ittmann
Copy link
Contributor Author

ittmann commented Apr 20, 2021

Tested again (in docker with php:8.0-apache) after the version changes suggested by samsonasik dc82d2c
composer install with minimal install option works fine and the application runs without any issues.

Choosing MVC testing support or installing laminas-test after initial project creation fails (PHP 8.0 support hasn't been added to laminas-test yet)

Everything works as expected with php:7.3-apache / the current project Dockerfile and docker-compose.yml

Copy link
Member

@samsonasik samsonasik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are extra components that need to be check against php 8, but for basic installation, I think it is ready 👍

@samsonasik
Copy link
Member

I am merging it now, I will verify the latest components inside "extra" config.

@samsonasik samsonasik merged commit 84ba087 into laminas:1.2.x May 31, 2021
@samsonasik
Copy link
Member

Thank you @ittmann

@ittmann ittmann deleted the php8 branch January 20, 2022 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PHP 8.0 support
4 participants