Code Monkey home page Code Monkey logo

Comments (15)

Hywan avatar Hywan commented on June 1, 2024 1

We've decided to merge the php7 branch on master to smooth the transitions and setting up the new CI.

from central.

Hywan avatar Hywan commented on June 1, 2024 1

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

  1. Create a Source/ directory,
  2. Move all source code to this directory (only source code, so it excludes documentation, bin, tests, and hidden files or README.md & co),
  3. Be sure to update hoa://Library paths, e.g.:
- hoa://Library/Console/Terminfo
+ hoa://Library/Console/Source/Terminfo
  1. 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.

  1. Run composer install,
  2. Run hoa devtools:cs,
  3. Run …/type-util.php add --php71 Source/,
  4. Remove the PHPDoc (but keep documentation, so remove only the @* tags),
  5. 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.

from central.

vonglasow avatar vonglasow commented on June 1, 2024 1

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

from central.

Hywan avatar Hywan commented on June 1, 2024 1

@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 :-).

from central.

Pierozi avatar Pierozi commented on June 1, 2024

@Hywan Can I help there? Which repository should I focus?

from central.

Hywan avatar Hywan commented on June 1, 2024

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.

from central.

Pierozi avatar Pierozi commented on June 1, 2024

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 🚴‍♂️

from central.

Hywan avatar Hywan commented on June 1, 2024

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.

from central.

Grummfy avatar Grummfy commented on June 1, 2024

nice.

from central.

shulard avatar shulard commented on June 1, 2024

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 ?

from central.

Pierozi avatar Pierozi commented on June 1, 2024

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.

from central.

Majkl578 avatar Majkl578 commented on June 1, 2024

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.

from central.

Hywan avatar Hywan commented on June 1, 2024

@Majkl578 My personal deadline is to finish everything before Mars. Would it work?

from central.

Majkl578 avatar Majkl578 commented on June 1, 2024

@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.

from central.

sanmai avatar sanmai commented on June 1, 2024

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.)

from central.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.