Drop PHP 5.x
See https://github.com/hoaproject/Central/issues/74 for more information.
Progression
| Library | PR | Tests are green | Merged |
|---|---|---|---|
| Acl | ✅ | ✅ | ❌ |
| Bench | ✅ | ✅ | ❌ |
| Cli | ✅ | ✅ | ✅ |
| Compiler | ✅ | ✅ | ❌ |
| Consistency | ✅ | ❌ | ✅ |
| Console | ✅ | ✅ | ✅ |
| Database | ✅ | ✅ | ❌ |
| Devtools | ❌ | ❌ | ❌ |
| Dispatcher | ✅ | ✅ | ❌ |
| Dns | ✅ | ❌ | ❌ |
| Event | ✅ | ❌ | ✅ |
| Eventsource | ✅ | ❌ | ❌ |
| Exception | ✅ | ❌ | ✅ |
| Fastcgi | ✅ | ❌ | ❌ |
| File | ✅ | ✅ | ✅ |
| Graph | ❌ | ❌ | ❌ |
| Heap | ❌ | ❌ | ❌ |
| Http | ✅ | ✅ | ✅ |
| Irc | ✅ | ❌ | ❌ |
| Iterator | ✅ | ✅ | ✅ |
| Json | ✅ | ❌ | ✅ |
| Locale | ✅ | ✅ | ✅ |
| ✅ | ❌ | ❌ | |
| Math | ✅ | ✅ | ✅ |
| Mime | ✅ | ✅ | ❌ |
| Option | ✅ | ✅ | ✅ |
| Praspel | ❌ | ❌ | ❌ |
| Promise | ✅ | ❌ | ❌ |
| Protocol | ✅ | ❌ | ✅ |
| Realdom | ❌ | ❌ | ❌ |
| Regex | ✅ | ❌ | ✅ |
| Registry | ✅ | ✅ | ❌ |
| Router | ❌ | ❌ | ❌ |
| Ruler | ❌ | ❌ | ❌ |
| Session | ❌ | ❌ | ❌ |
| Socket | ✅ | ✅ | ✅ |
| Stream | ✅ | ✅ | ✅ |
| Stringbuffer | ❌ | ❌ | ❌ |
| Test | ✅ | ✅ | ✅ |
| Ustring | ✅ | ✅ | ✅ |
| View | ✅ | ✅ | ✅ |
| Visitor | ✅ | ✅ | ✅ |
| Websocket | ✅ | ✅ | ✅ |
| Worker | ✅ | ❌ | ❌ |
| Xml | ❌ | ❌ | ❌ |
| Xyl | ❌ | ❌ | ❌ |
| Zformat | ❌ | ❌ | ❌ |
| Zombie | ✅ | ✅ | ❌ |
@Hywan Can I help there? Which repository should I focus?
That's a good question.
Right now, it is very hard unfortunately… Let me explain why.
Assuming we would like to update hoa/console, we have to test it right? But our test infrastructure depends on Hoa, and it is a mistake at some point… So to test hoa/console, we need to update hoa/test, and to update hoa/test, we need to update hoa/cli, hoa/stream, hoa/file, hoa/ustring etc.
So far, I'm focusing on moving hoa/test and its dependencies to PHP 7.1+.
Why is it hard? Because I have to “hack” composer to not rely on remote Git repositories but on local ones, so that I can iterate more easily (I don't have to push and pull everytime I have a type issue for instance). So I'm afraid it's a lonely wolf job for few weeks :-(. Except if you replicate my weird hack setup locally.
Once it's done, we will be able to update libraries more easily.
Hint: I use https://github.com/nikic/TypeUtil/ to add types, and I use hoa/devtools to fix everything else. I've to go manually over all the code though to remove PHPDoc, and check the results.
I can see you rock on this.
You right it's hard, I'm trying to complain Hoa\Heap with php7 / kitab and even this tiny library
causing me issue.
Good luck :biking_man:
We've decided to merge the php7 branch on master to smooth the transitions and setting up the new CI.
Tests are still broken because we use dev-master without any aliases. I propose to continue the migration process by running test locally, and then doing another pass to fix the CI.
nice.
Hello @Hywan,
I've started to work on some migration PRs but I got an error about the atoum/praspel-extension when I try to install dev-master dependencies.
Problem 1
- atoum/praspel-extension 0.17.02.24 requires hoa/consistency ~1.0 -> satisfiable by hoa/consistency[1.16.01.11, 1.16.01.14, 1.16.03.03, 1.17.01.10, 1.17.05.02] but these conflict with your requirements or minimum-stability.
- atoum/praspel-extension 0.17.02.24 requires hoa/consistency ~1.0 -> satisfiable by hoa/consistency[1.16.01.11, 1.16.01.14, 1.16.03.03, 1.17.01.10, 1.17.05.02] but these conflict with your requirements or minimum-stability.
- hoa/test dev-master requires atoum/praspel-extension ~0.17 -> satisfiable by atoum/praspel-extension[0.17.02.24].
- Installation request for hoa/test dev-master -> satisfiable by hoa/test[dev-master].
It seems that you run your tests locally, how are you bypassing that error ? Are you using a custom version for that extension ? If so maybe it can be useful to add these extension in the migration process ?
Guide to migrate to PHP 7.1
1. Require PHP 7.1
Update composer.json to require PHP 7.1:
- "php" : ">=5.5.0",
+ "php" : ">=7.1",
2. Move sources to the new Source/ directory
- Create a
Source/directory, - Move all source code to this directory (only source code, so it excludes documentation, bin, tests, and hidden files or
README.md& co), - Be sure to update
hoa://Librarypaths, e.g.:
- hoa://Library/Console/Terminfo
+ hoa://Library/Console/Source/Terminfo
- Update the autoloader in
composer.json, e.g.:
"autoload": {
"psr-4": {
- "Hoa\\Console\\": "."
+ "Hoa\\Console\\" : "Source",
+ "Hoa\\Console\\Bin\\" : "Bin",
+ "Hoa\\Console\\Test\\": "Test"
3. Update code to PHP 7.1
Pre-requisite: Install TypeUtil.
- Run
composer install, - Run
hoa devtools:cs, - Run
…/type-util.php add --php71 Source/, - Remove the PHPDoc (but keep documentation, so remove only the
@*tags), - Try to run test with
vendor/bin/hoa test:run, have fun.
4. Put all dependencies to dev-master
Update composer.json and change all dependencies to dev-master. Maybe we should update minimum-stability too, not sure.
Hello @Hywan
If we want to run the test and therefore composer install (locally and on travis) we must set minimum-stability: dev the only issue is related to dependency.
I'm kind of struggle due to Kitab (dependency of hoa/test)
We must update master branch of kitab to use dev-master on all hoa/*
My case with a fix on hoa\socket, require hoa/test that include kitab but have conflict with hoa/exception.
Hi, any update here? It really becomes a blocker for Doctrine and AFAIR it is already an issue e.g. for JMS Serializer (cc @goetas). Thanks.
Some external impediments have slow down the progress, but we are still on it. We are focus on the lib which are the most directly related to your concern.
/cc @Hywan @Majkl578 @goetas
@Majkl578 My personal deadline is to finish everything before Mars. Would it work?
@Hywan Assuming you meant March (not Mars - external dependency on SpaceX may be a bit, well, unstable :P), that's fine, thanks! Let me know if I can help.
@Majkl578 Haha, yeah, hum hum, indeed! I re-scheduled my life a little bit to boost Hoa. The refactoring for PHP 7.x might come earlier. My personal target is mid-February, but let's keep March the official deadline.
Let me know if I can help.
Being patient already means a lot to us :-).
Is there a way to help?
(So far switching to depend on dev-master shown being problematic. I can't even suggest people use a dev version because it may not install at all because of dependencies. It appears to me much better solution would be a beta version release for each related package.)