Giter Site home page Giter Site logo

composer-monolith's People

Contributors

nusje2000 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

leroy1112

composer-monolith's Issues

Add referenced by to version constraint question in autofixer

This is the current question:

What version of "symfony/security" would you like to require (referenced as [^3.3, ^1.1]) ?

It would be nice if the package referencing the version is displayed as well:

What version of "symfony/security" would you like to require (referenced as [internal/package-1: ^3.3, internal/package-2: ^1.1]) ?

Remove dev-only check

The behaviour of this check is not expected. i.e. when you define a package the is only used in development, it makes sense to define the dependencies as require instead of require-dev.

Set replace in root definition for internal packages

See: https://github.com/symfony/symfony/blob/master/composer.json

In a composer.json you can set replaces for packages that the defined packages replaces. Within a monolithic repository usually the replace is defined for each internal package. See symfony for example, you could require each component individually, or you could require symfony/symfony.

There should be a new Rule that checks if an internal package is registered and there should be an autofixer that can fix this problem automatically (thus adding a package to the replace and setting the version to self.version).

Use an AST to validate use statements

nusje2000/phpstan-monolith uses PHP Stan to validate use statements in source code based on the composer.json, but this currently has a few limitations:

  • It is build with PHP Stan so the error's cannot be fixed automatically with an autofixer
  • PHP Stan is significantly slower when using the extension
  • Errors can be confusing to read since one missing package can lead to hundreds of errors
  • Due to the caching that phpstan uses, updating the composer.json will not resolve the errors because the cached errors are shown

This should not be difficult to achieve using the nikic/PHP-Parser package.

This should also come with a feature to generate a baseline for the errors that occur to be fixed later.

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.