Git Product home page Git Product logo

composer-preload's Issues

Compatibility issue with Symfony 5

If you have symfony/console 5.x installed globally/for composer, then you get the following error:

Fatal error: Uncaught TypeError: Return value of "Ayesh\ComposerPreload\Composer\Command\PreloadCommand::execute()" must be of the type int, "null" returned. vendor/symfony/console/Command/Command.php:259

Needs to add a return 0;

Deprecated PreloadList::getIterator() / PHP 8.1

Deprecated: Return type of Ayesh\ComposerPreload\PreloadList::getIterator(): iterable should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Fix generated paths

Preload file uses absolute paths. Unless both of your servers have same directory hierarchy, you cannot do this. It is recommend not to include the vendor/preload.php file in your version control system.

But there is another case - you use build server, prepare package and upload code to server. Build server has different path. In my example I use Heroku

The plugin should take dependencies into account

Hi,

I wanted to try your plugin out, but I got the following issues:

Can't preload unlinked class AbcChild: Unknown parent
Can't preload unlinked class BcdImplementation: Unknown interface 

It means that in order for preloading to work, dependencies should be resolved first, and classes should be preloaded in the right order.

Incompatible with symfony 3?

I was excited to try this out with Drupal 8, but it seems to require symfony 4, and Drupal 8 is symfony 3. That should probably go into the README.

Thanks for the excellent thinking and work on this!

Using version ^0.0.4 for ayesh/composer-preload
./composer.json has been updated
> DrupalProject\composer\ScriptHandler::checkComposerVersion
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for ayesh/composer-preload ^0.0.4 -> satisfiable by ayesh/composer-preload[v0.0.4].
    - Conclusion: remove symfony/finder v3.4.18
    - Conclusion: don't install symfony/finder v3.4.18
    - ayesh/composer-preload v0.0.4 requires symfony/finder ^4.1 -> satisfiable by symfony/finder[4.1.x-dev, 4.2.x-dev, v4.1.0, v4.1.0-BETA1, v4.1.0-BETA2, v4.1.0-BETA3, v4.1.1, v4.1.2, v4.1.3, v4.1.4, v4.1.5, v4.1.6, v4.1.7, v4.2.0-BETA1, v4.2.0-BETA2].
    - Can only install one of: symfony/finder[4.1.x-dev, v3.4.18].
    - Can only install one of: symfony/finder[4.2.x-dev, v3.4.18].
    - Can only install one of: symfony/finder[v4.1.0, v3.4.18].
    - Can only install one of: symfony/finder[v4.1.0-BETA1, v3.4.18].
    - Can only install one of: symfony/finder[v4.1.0-BETA2, v3.4.18].
    - Can only install one of: symfony/finder[v4.1.0-BETA3, v3.4.18].
    - Can only install one of: symfony/finder[v4.1.1, v3.4.18].
    - Can only install one of: symfony/finder[v4.1.2, v3.4.18].
    - Can only install one of: symfony/finder[v4.1.3, v3.4.18].
    - Can only install one of: symfony/finder[v4.1.4, v3.4.18].
    - Can only install one of: symfony/finder[v4.1.5, v3.4.18].
    - Can only install one of: symfony/finder[v4.1.6, v3.4.18].
    - Can only install one of: symfony/finder[v4.1.7, v3.4.18].
    - Can only install one of: symfony/finder[v4.2.0-BETA1, v3.4.18].
    - Can only install one of: symfony/finder[v4.2.0-BETA2, v3.4.18].
    - Installation request for symfony/finder (locked at v3.4.18) -> satisfiable by symfony/finder[v3.4.18].

Drupal 8 really needs this :)

I'm successful with it (at the composer require level) on TYPO3 v9.

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.