Skip to content
This repository has been archived by the owner on Oct 20, 2022. It is now read-only.

Error during installation of Version 3.4 with PHP 7.3 #231

Closed
Mynyx opened this issue Jun 18, 2019 · 3 comments
Closed

Error during installation of Version 3.4 with PHP 7.3 #231

Mynyx opened this issue Jun 18, 2019 · 3 comments

Comments

@Mynyx
Copy link

Mynyx commented Jun 18, 2019

During the installation of version 3.4 with PHP 7.3 an error occurs (no problem with PHP 7.2):

$ php73 ./composer create-project symfony/website-skeleton:~3.4.0 my_project
Installing symfony/website-skeleton (v3.4.28.6)
  - Installing symfony/website-skeleton (v3.4.28.6): Loading from cache
Created project in my_project
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Package operations: 92 installs, 0 updates, 0 removals
  - Installing ocramius/package-versions (1.2.0): Loading from cache
  - Installing symfony/flex (v1.2.7): Loading from cache
Restricting packages listed in "symfony/symfony" to "3.4.*"
  - Installing doctrine/collections (v1.4.0): Loading from cache
  - Installing symfony/polyfill-mbstring (v1.11.0): Loading from cache
  - Installing doctrine/lexer (1.0.2): Loading from cache
  - Installing doctrine/inflector (v1.2.0): Loading from cache
  - Installing doctrine/cache (v1.6.2): Loading from cache
  - Installing doctrine/annotations (v1.4.0): Loading from cache
  - Installing doctrine/common (v2.7.3): Loading from cache
  - Installing symfony/doctrine-bridge (v3.4.28): Loading from cache
  - Installing doctrine/doctrine-cache-bundle (1.3.5): Loading from cache
  - Installing doctrine/instantiator (1.0.5): Loading from cache
  - Installing symfony/yaml (v3.4.28): Loading from cache
  - Installing psr/log (1.1.0): Loading from cache
  - Installing symfony/debug (v3.4.28): Loading from cache
  - Installing symfony/console (v3.4.28): Loading from cache
  - Installing zendframework/zend-eventmanager (3.2.1): Loading from cache
  - Installing zendframework/zend-code (3.1.0): Loading from cache
  - Installing ocramius/proxy-manager (2.0.4): Loading from cache
  - Installing doctrine/dbal (v2.5.13): Loading from cache
  - Installing doctrine/migrations (v1.5.0): Loading from cache
  - Installing egulias/email-validator (2.1.8): Loading from cache
  - Installing jdorn/sql-formatter (v1.2.17): Loading from cache
  - Installing phpdocumentor/reflection-common (1.0.1): Loading from cache
  - Installing phpdocumentor/type-resolver (0.4.0): Loading from cache
  - Installing psr/cache (1.0.1): Loading from cache
  - Installing psr/container (1.0.0): Loading from cache
  - Installing psr/simple-cache (1.0.1): Loading from cache
  - Installing symfony/http-foundation (v3.4.28): Loading from cache
  - Installing symfony/event-dispatcher (v3.4.28): Loading from cache
  - Installing symfony/http-kernel (v3.4.28): Loading from cache
  - Installing symfony/routing (v3.4.28): Loading from cache
  - Installing symfony/finder (v3.4.28): Loading from cache
  - Installing symfony/filesystem (v3.4.28): Loading from cache
  - Installing symfony/dependency-injection (v3.4.28): Loading from cache
  - Installing symfony/config (v3.4.28): Loading from cache
  - Installing symfony/class-loader (v3.4.28): Loading from cache
  - Installing symfony/polyfill-apcu (v1.11.0): Loading from cache
  - Installing symfony/cache (v3.4.28): Loading from cache
  - Installing symfony/framework-bundle (v3.4.28): Loading from cache
  - Installing sensio/framework-extra-bundle (v5.2.4): Loading from cache
  - Installing symfony/asset (v3.4.28): Loading from cache
  - Installing symfony/dotenv (v3.4.28): Loading from cache
  - Installing symfony/expression-language (v3.4.28): Loading from cache
  - Installing symfony/inflector (v3.4.28): Loading from cache
  - Installing symfony/property-access (v3.4.28): Loading from cache
  - Installing symfony/options-resolver (v3.4.28): Loading from cache
  - Installing symfony/intl (v3.4.28): Loading from cache
  - Installing symfony/polyfill-intl-icu (v1.11.0): Loading from cache
  - Installing symfony/form (v3.4.28): Loading from cache
  - Installing monolog/monolog (1.24.0): Loading from cache
  - Installing symfony/monolog-bridge (v3.4.28): Loading from cache
  - Installing doctrine/orm (v2.5.14): Loading from cache
  - Installing doctrine/doctrine-bundle (1.10.3): Loading from cache
  - Installing doctrine/doctrine-migrations-bundle (v1.3.2): Loading from cache
  - Installing symfony/orm-pack (v1.0.6): Loading from cache
  - Installing symfony/polyfill-php72 (v1.11.0): Loading from cache
  - Installing symfony/polyfill-intl-idn (v1.11.0): Loading from cache
  - Installing symfony/security (v3.4.28): Loading from cache
  - Installing symfony/security-bundle (v3.4.28): Loading from cache
  - Installing symfony/serializer (v3.4.28): Loading from cache
  - Installing symfony/property-info (v3.4.28): Loading from cache
  - Installing webmozart/assert (1.4.0): Loading from cache
  - Installing phpdocumentor/reflection-docblock (4.3.1): Loading from cache
  - Installing symfony/serializer-pack (v1.0.2): Loading from cache
  - Installing swiftmailer/swiftmailer (v6.2.1): Loading from cache
  - Installing symfony/swiftmailer-bundle (v3.2.7): Loading from cache
  - Installing symfony/translation (v3.4.28): Loading from cache
  - Installing symfony/validator (v3.4.28): Loading from cache
  - Installing psr/link (1.0.0): Loading from cache
  - Installing fig/link-util (1.0.0): Loading from cache
  - Installing symfony/web-link (v3.4.28): Loading from cache
  - Installing symfony/var-dumper (v3.4.28): Loading from cache
  - Installing twig/twig (v2.11.2): Loading from cache
  - Installing symfony/twig-bridge (v3.4.28): Loading from cache
  - Installing symfony/web-profiler-bundle (v3.4.28): Loading from cache
  - Installing symfony/twig-bundle (v3.4.28): Loading from cache
  - Installing symfony/stopwatch (v3.4.28): Loading from cache
  - Installing symfony/profiler-pack (v1.0.4): Loading from cache
  - Installing symfony/monolog-bundle (v3.3.1): Loading from cache
  - Installing symfony/debug-bundle (v3.4.28): Loading from cache
  - Installing easycorp/easy-log-handler (v1.0.7): Loading from cache
  - Installing symfony/debug-pack (v1.0.7): Loading from cache
  - Installing symfony/dom-crawler (v3.4.28): Loading from cache
  - Installing nikic/php-parser (v4.2.2): Loading from cache
  - Installing symfony/maker-bundle (v1.11.6): Loading from cache
  - Installing symfony/phpunit-bridge (v4.3.1): Loading from cache
  - Installing symfony/css-selector (v3.4.28): Loading from cache
  - Installing symfony/browser-kit (v3.4.28): Loading from cache
  - Installing symfony/test-pack (v1.0.2): Loading from cache
  - Installing symfony/process (v3.4.28): Loading from cache
  - Installing symfony/web-server-bundle (v3.4.28): Loading from cache
Generating autoload files
ocramius/package-versions:  Generating version class...
ocramius/package-versions: ...done generating version class
Symfony operations: 20 recipes (a9949a28e9aa94b43f734b4dfd7e419f)
  - Configuring symfony/flex (>=1.0): From github.com/symfony/recipes:master
  - Configuring symfony/framework-bundle (>=3.3): From github.com/symfony/recipes:master
  - Configuring doctrine/annotations (>=1.0): From github.com/symfony/recipes:master
  - Configuring doctrine/doctrine-cache-bundle (>=1.3.5): From auto-generated recipe
  - Configuring symfony/console (>=3.3): From github.com/symfony/recipes:master
  - Configuring symfony/routing (>=3.3): From github.com/symfony/recipes:master
  - Configuring sensio/framework-extra-bundle (>=5.2): From github.com/symfony/recipes:master
  - Configuring doctrine/doctrine-bundle (>=1.6): From github.com/symfony/recipes:master
  - Configuring doctrine/doctrine-migrations-bundle (>=1.2): From github.com/symfony/recipes:master
  - Configuring symfony/security-bundle (>=3.3): From github.com/symfony/recipes:master
  - Configuring symfony/swiftmailer-bundle (>=2.5): From github.com/symfony/recipes:master
  - Configuring symfony/translation (>=3.3): From github.com/symfony/recipes:master
  - Configuring symfony/web-profiler-bundle (>=3.3): From github.com/symfony/recipes:master
  - Configuring symfony/twig-bundle (>=3.3): From github.com/symfony/recipes:master
  - Configuring symfony/monolog-bundle (>=3.3): From github.com/symfony/recipes:master
  - Configuring symfony/debug-bundle (>=3.3): From github.com/symfony/recipes:master
  - Configuring easycorp/easy-log-handler (>=1.0): From github.com/symfony/recipes:master
  - Configuring symfony/maker-bundle (>=1.0): From github.com/symfony/recipes:master
  - Configuring symfony/phpunit-bridge (>=4.3): From github.com/symfony/recipes:master
  - Configuring symfony/web-server-bundle (>=3.3): From github.com/symfony/recipes:master
Executing script cache:clear [KO]
 [KO]
Script cache:clear returned with error code 1
!!
!!  In UnitOfWork.php line 2636:
!!
!!    Warning: "continue" targeting switch is equivalent to "break". Did you mean
!!     to use "continue 2"?
!!
!!
!!
Script @auto-scripts was called via post-install-cmd
@nicolas-grekas
Copy link
Member

This is the same issue as https://github.com/symfony/symfony-standard/issues/1138
Let's wait for it to be resolved and we'll have the answer to this one too.

fabpot added a commit to symfony/symfony that referenced this issue Jun 19, 2019
This PR was merged into the 3.4 branch.

Discussion
----------

[Debug] workaround BC break in PHP 7.3

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony-standard/issues/1138 symfony/website-skeleton#231
| License       | MIT
| Doc PR        | -

A new warning has been added in PHP 7.3 that is breaking BC with Symfony, since we turn warnings into exceptions.
This PR turns the new warning into a deprecation, so that we will be able to remove the added "if" in 5.0.

I noticed a few other similar BC breaks in 7.1 and 7.2, but *unless someone reports that they block them*, I don't think we need to care.
- 7.1 A non well formed numeric value encountered E_NOTICE
- 7.1 A non-numeric value encountered E_WARNING
- 7.2 count() now raises a warning when an invalid parameter is passed.

See https://github.com/php/php-src/blob/PHP-7.1/UPGRADING + same in upper branches.

Commits
-------

d8d43e6 [Debug] workaround BC break in PHP 7.3
@nicolas-grekas
Copy link
Member

Fix merged, will work once we tag a new 3.4 release.

fabpot added a commit to symfony/flex that referenced this issue Jun 22, 2019
…e-project & update (nicolas-grekas)

This PR was merged into the 1.2-dev branch.

Discussion
----------

Merge new "flex-require" section with "require" on create-project & update

The goal of this PR is to remove the need for any skeleton-bot as used in https://github.com/symfony/skeleton/pulls?q=is%3Apr+is%3Aclosed+author%3Asymfony-skeleton-bot

As a reminder, this bot is currently needed to generate a `composer.lock`. And this file is needed because it's part of a work around to fix a combinatorial explosion when Composer solves dependencies.

This PR makes `create-project` a two steps process: first, a skeleton is installed with only flex in "require". When flex is installed and composer enables it, the plugin looks for specific entries in the composer.json file, namely "flex-require" and "flex-require-dev". It merges them with regular "require" and "require-dev", and runs a new "composer update" internally.

This also fixes the combinatorial explosion and allows downloading deps in parallel, but it also allows taking the local platform into account - while the current approach with bots forces initial resolution with the minimum supported PHP version. (fixing e.g. symfony/symfony-standard#1138 and symfony/website-skeleton#231 too).

Embeds a few fixes found meanwhile.
Fixes #450 too.

Commits
-------

d11742f Merge new "flex-require" section with "require" on create-project & update
@mdjbilou
Copy link

mdjbilou commented Dec 18, 2019

this command it's worked
composer create-project symfony/framework-standard-edition:^3.4.36 name_project

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants