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

Installs PHP 7.2 #95

Merged
merged 5 commits into from
May 22, 2019
Merged

Installs PHP 7.2 #95

merged 5 commits into from
May 22, 2019

Conversation

ajstanley
Copy link
Contributor

Installs PHP 7.2 to allow the Riprap microservice and module to install.

@whikloj
Copy link
Member

whikloj commented Feb 22, 2019

It appears that RipRap supports PHP 7.1.3 and greater.

@ajstanley
Copy link
Contributor Author

ajstanley commented Feb 23, 2019 via email

@whikloj
Copy link
Member

whikloj commented Feb 23, 2019 via email

@mjordan
Copy link
Contributor

mjordan commented Feb 23, 2019

@mjordan
Copy link
Contributor

mjordan commented Feb 23, 2019

@seth-shaw-unlv got Riprap to work on the claw-playbook. See mjordan/riprap#20. Not sure how he handled the PHP requirement though.

@whikloj
Copy link
Member

whikloj commented Feb 24, 2019 via email

@mjordan
Copy link
Contributor

mjordan commented Feb 24, 2019

If @ajstanley's PR works, any reason why we shouldn't install PHP 7.2 on the claw-playbook?

@dannylamb
Copy link
Member

Just that it will be tougher to get the minimum PHP version to do things like update composer.lock files and such. We can always just drop 7.1 and roll out with only 7.2+ if folks don't think it's too late.

@seth-shaw-unlv
Copy link
Member

@mjordan and @whikloj I just run 7.2 on CentOS.

@whikloj
Copy link
Member

whikloj commented Feb 27, 2019

Looking at this again, symfony/flex:^1.1 supports PHP 7.0.

@rosiel
Copy link
Contributor

rosiel commented Mar 6, 2019

So... is there anything standing in the way of moving to 7.2?

@ajstanley
Copy link
Contributor Author

I've found a couple of minor problems - don't merge this one just yet.

@ajstanley
Copy link
Contributor Author

Should be good now.

@rosiel
Copy link
Contributor

rosiel commented Mar 27, 2019

@Islandora-Devops/committers are there any concerns with switching to 7.2? To respond explicitly to @whikloj 's point, which implies that this whole PR isn't necessary, it is necessary because Riprap requires Symfony 4, which requires 7.1.3+ as @mjordan pointed out.

@Natkeeran
Copy link
Contributor

Natkeeran commented Mar 27, 2019

@rosiel It was decided to go with 7.2 at this meeting: https://github.com/Islandora-CLAW/CLAW/wiki/February-27%2C-2019. If we run into any issues, we can deal with them as they arise.

@whikloj
Copy link
Member

whikloj commented Mar 27, 2019

Just to clarify my reasoning.

  1. Symfony 4 has a dependency on PHP 7.1.3, but RipRap has a dependency on symfony/flex:^1.1
  2. The composer version constraint ^1.1 means version >= 1.1.* and version < 2.*
  3. Symfony/Flex version 1.2.0 (the most current) supports PHP 7.0

and finally

I just cloned RipRap into an existing claw-playbook instance running PHP 7.1.27, installed it and ran it.

vagrant@claw:/var/www/html/riprap$ COMPOSER_MEMORY_LIMIT=-1 php -d memory_limit=-1 /usr/local/bin/composer update
Deprecation warning: Your package name riprap is invalid, it should have a vendor name, a forward slash, and a package name. The vendor and package name can be words separated by -, . or _. The complete name should match "[a-z0-9]([_.-]?[a-z0-9]+)*/[a-z0-9]([_.-]?[a-z0-9]+)*". Make sure you fix this as Composer 2.0 will error.
Cannot create cache directory /home/vagrant/.composer/cache/repo/https---repo.packagist.org/, or directory is not writable. Proceeding without cache
Cannot create cache directory /home/vagrant/.composer/cache/files/, or directory is not writable. Proceeding without cache
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 78 installs, 0 updates, 0 removals
  - Installing symfony/flex (v1.2.0): Downloading (100%)         
Cannot create cache directory /home/vagrant/.composer/cache/repo/https---repo.packagist.org/, or directory is not writable. Proceeding without cache
Cannot create cache directory /home/vagrant/.composer/cache/repo/https---repo.packagist.org/, or directory is not writable. Proceeding without cache
Cannot create cache directory /home/vagrant/.composer/cache/repo/https---flex.symfony.com/, or directory is not writable. Proceeding without cache
Cannot create cache directory /home/vagrant/.composer/cache/repo/https---repo.packagist.org/, or directory is not writable. Proceeding without cache
  - Installing ocramius/package-versions (1.4.0): Downloading (100%)         
  - Installing guzzlehttp/promises (v1.3.1): Downloading (100%)         
  - Installing ralouphie/getallheaders (2.0.5): Downloading (100%)         
  - Installing psr/http-message (1.0.1): Downloading (100%)         
  - Installing guzzlehttp/psr7 (1.5.2): Downloading (100%)         
  - Installing guzzlehttp/guzzle (6.3.3): Downloading (100%)         
  - Installing ramsey/uuid (3.8.0): Downloading (100%)         
  - Installing symfony/yaml (v4.2.4): Downloading (100%)         
  - Installing psr/log (1.1.0): Downloading (100%)         
  - Installing symfony/debug (v4.2.4): Downloading (100%)         
  - Installing symfony/polyfill-mbstring (v1.11.0): Downloading (100%)         
  - Installing symfony/http-foundation (v4.2.4): Downloading (100%)         
  - Installing symfony/contracts (v1.0.2): Downloading (100%)         
  - Installing symfony/event-dispatcher (v4.2.4): Downloading (100%)         
  - Installing symfony/http-kernel (v4.2.4): Downloading (100%)         
  - Installing symfony/routing (v4.2.4): Downloading (100%)         
  - Installing symfony/finder (v4.2.4): Downloading (100%)         
  - Installing symfony/filesystem (v4.2.4): Downloading (100%)         
  - Installing psr/container (1.0.0): Downloading (100%)         
  - Installing symfony/dependency-injection (v4.2.4): Downloading (100%)         
  - Installing symfony/config (v4.2.4): Downloading (100%)         
  - Installing symfony/var-exporter (v4.2.4): Downloading (100%)         
  - Installing psr/simple-cache (1.0.1): Downloading (100%)         
  - Installing psr/cache (1.0.1): Downloading (100%)         
  - Installing symfony/cache (v4.2.4): Downloading (100%)         
  - Installing symfony/framework-bundle (v4.2.4): Downloading (100%)         
  - Installing symfony/console (v4.2.4): Downloading (100%)         
  - Installing nikic/php-parser (v4.2.1): Downloading (100%)         
  - Installing doctrine/inflector (v1.3.0): Downloading (100%)         
  - Installing symfony/maker-bundle (v1.11.5): Downloading (100%)         
  - Installing monolog/monolog (1.24.0): Downloading (100%)         
  - Installing symfony/monolog-bridge (v4.2.4): Downloading (100%)         
  - Installing symfony/monolog-bundle (v3.3.1): Downloading (100%)         
  - Installing symfony/stopwatch (v4.2.4): Downloading (100%)         
  - Installing zendframework/zend-eventmanager (3.2.1): Downloading (100%)         
  - Installing zendframework/zend-code (3.3.1): Downloading (100%)         
  - Installing ocramius/proxy-manager (2.1.1): Downloading (100%)         
  - Installing doctrine/event-manager (v1.0.0): Downloading (100%)         
  - Installing doctrine/cache (v1.8.0): Downloading (100%)         
  - Installing doctrine/dbal (v2.9.2): Downloading (100%)         
  - Installing doctrine/lexer (v1.0.1): Downloading (100%)         
  - Installing doctrine/annotations (v1.6.1): Downloading (100%)         
  - Installing doctrine/reflection (v1.0.0): Downloading (100%)         
  - Installing doctrine/collections (v1.6.1): Downloading (100%)         
  - Installing doctrine/persistence (v1.1.0): Downloading (100%)         
  - Installing doctrine/common (v2.10.0): Downloading (100%)         
  - Installing doctrine/migrations (v2.0.0): Downloading (100%)         
  - Installing symfony/inflector (v4.2.4): Downloading (100%)         
  - Installing symfony/property-access (v4.2.4): Downloading (100%)         
  - Installing symfony/security-core (v4.2.4): Downloading (100%)         
  - Installing symfony/doctrine-bridge (v4.2.4): Downloading (100%)         
  - Installing doctrine/doctrine-cache-bundle (1.3.5): Downloading (100%)         
  - Installing jdorn/sql-formatter (v1.2.17): Downloading (100%)         
  - Installing doctrine/doctrine-bundle (1.10.2): Downloading (100%)         
  - Installing doctrine/doctrine-migrations-bundle (v2.0.0): Downloading (100%)         
  - Installing doctrine/instantiator (1.2.0): Downloading (100%)         
  - Installing doctrine/orm (v2.6.3): Downloading (100%)         
  - Installing symfony/orm-pack (v1.0.6): Downloading (100%)         
  - Installing symfony/security-http (v4.2.4): Downloading (100%)         
  - Installing symfony/security-guard (v4.2.4): Downloading (100%)         
  - Installing symfony/security-csrf (v4.2.4): Downloading (100%)         
  - Installing symfony/security-bundle (v4.2.4): Downloading (100%)         
  - Installing symfony/polyfill-php72 (v1.11.0): Downloading (100%)         
  - Installing symfony/polyfill-intl-idn (v1.11.0): Downloading (100%)         
  - Installing egulias/email-validator (2.1.7): Downloading (100%)         
  - Installing swiftmailer/swiftmailer (v6.2.0): Downloading (100%)         
  - Installing symfony/swiftmailer-bundle (v3.2.5): Downloading (100%)         
  - Installing symfony/messenger (v4.2.4): Downloading (100%)         
  - Installing symfony/dotenv (v4.2.4): Downloading (100%)         
  - Installing symfony/process (v4.2.4): Downloading (100%)         
  - Installing symfony/web-server-bundle (v4.2.4): Downloading (100%)         
  - Installing symfony/phpunit-bridge (v4.2.4): Downloading (100%)         
  - Installing symfony/dom-crawler (v4.2.4): Downloading (100%)         
  - Installing symfony/browser-kit (v4.2.4): Downloading (100%)         
  - Installing doctrine/data-fixtures (v1.3.1): Downloading (100%)         
  - Installing doctrine/doctrine-fixtures-bundle (3.1.0): Downloading (100%)         
  - Installing squizlabs/php_codesniffer (3.4.1): Downloading (100%)         
Writing lock file
Generating autoload files
ocramius/package-versions:  Generating version class...
ocramius/package-versions: ...done generating version class
Executing script cache:clear [OK]
Executing script assets:install public [OK]

vagrant@claw:/var/www/html/riprap$ php -v
PHP 7.1.27-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Mar  7 2019 20:02:03) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.1.27-1+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies
    with Xdebug v2.7.0, Copyright (c) 2002-2019, by Derick Rethans

vagrant@claw:/var/www/html/riprap$ php bin/console app:riprap:check_fixity --settings=sample_csv_config.yml
Riprap checked 2 resources (2 successful events, 0 failed events) in 0.123 seconds.

I'll note I had to edit the sample_csv_config.yml to point to files accessible to the vagrant machine.

@mjordan
Copy link
Contributor

mjordan commented Mar 27, 2019

@whikloj Will bumping the flex version riprap uses to symfony/flex:^1.2 provide better PHP 7.x compatibility? Flex 1.2 supports PHP ^7.0, which means that it should work with any version of PHP higher than 7.0. Is that correct?

@whikloj
Copy link
Member

whikloj commented Mar 27, 2019

@mjordan Bumping to ^1.2 has no effect at all. The ^ means all non-breaking changes are allowed. So you are good from version 1.1 all the way until (but not including) 2.0.0.

More information on this version constraint here

And yes, the flex PHP requirement is php: ^7.0 so again, they are saying all versions from 7.0 up to (but not including) 8.0.

Also, and this is a mea culpa, version 7.1.3 < 7.1.27 which is how I was able to install it.

@mjordan
Copy link
Contributor

mjordan commented Mar 27, 2019

@whikloj thanks for the suggestions on updating riprap. I probably haven't had enough caffeine yet today but is there anything holding us back from using PHP 7.2 in the CLAW vagrant? I am running PHP 7.2.15-0ubuntu0.18.04.1 (cli) on my bare-metal laptop and riprap installs and runs fine.

@whikloj
Copy link
Member

whikloj commented Mar 27, 2019

@mjordan no, there is no reason why we can't do this. My point is that we would be choosing to drop support for PHP 7.1. There is no technical need, I just want people to be aware of that.

When we dropped PHP 5.6 and 7.0 support, the discussion was around Silex deprecation and that Symfony 4 required PHP 7.1.

Riprap runs under 7.2, but it also runs in claw-playbook under 7.1.

But to the question of what we need to do.

Along with this PR, the travis build scripts will need to be updated to remove 7.1 testing for the Drupal modules, Crayfish and Crayfish-Commons. Perhaps we should add in PHP 7.3 for testing. As well someone should send a note out to the community just to keep them informed.

@mjordan
Copy link
Contributor

mjordan commented Mar 27, 2019

@whikloj your clean explanation is worth more than any amount of caffeine. I get it now.

@dannylamb
Copy link
Member

Testing this now 🚀

@dannylamb
Copy link
Member

Installed fine. Could verify PHP 7.2 on the command line and went through a basic sanity check. Ingested an image -> gave it an original file -> checked derivatives -> verified fedora, solr, and triplestore indexing.

That was for Ubuntu. Didn't try CentOS. I need to use this environment to work through some things, but I'll give CentOS a whirl later just for sanity's sake before merging and doing all the afterwork for this.

@seth-shaw-unlv You use 7.2 and CentOS. Do you know if anything special needs to be done? Or does the 7.1 -> 7.2 change in webserver.yml take care of it.

@seth-shaw-unlv
Copy link
Member

@dannylamb you need to change it in both webserver.yml and crayfish.yml.

@dannylamb
Copy link
Member

@seth-shaw-unlv Gotcha. Both of those are covered under this PR.

@seth-shaw-unlv
Copy link
Member

@dannylamb, yeah, that should do it. I can kick off another build if you want.

@dannylamb
Copy link
Member

dannylamb commented May 22, 2019

@seth-shaw-unlv++ That would be awesome. If a CentOS build succeeds we can merge this in.

@seth-shaw-unlv
Copy link
Member

@dannylamb vagrant up!

Copy link
Member

@seth-shaw-unlv seth-shaw-unlv left a comment

Choose a reason for hiding this comment

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

CentOS 7 is go 🚀

@seth-shaw-unlv seth-shaw-unlv merged commit da7baae into Islandora-Devops:master May 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants