Git Product home page Git Product logo

Comments (5)

fabpot avatar fabpot commented on May 30, 2024

Thinking about this issue a bit more, I'm wondering if copying files from a package is really a feature we want to keep.

from flex.

nicolas-grekas avatar nicolas-grekas commented on May 30, 2024

Closing as staled. Please provide a PR ideally if you can.

from flex.

tperunsky avatar tperunsky commented on May 30, 2024

@nicolas-grekas
I would like to reopen this issue to discuss options.

The problem is described in more detail here: #604
Although it seems to me that the root cause is that \Symfony\Flex\Configurator\CopyFromPackageConfigurator::removeFilesFromDir() iterates over files in the package to figure out what to delete from the project. This is probably to make sure Flex doesn't delete files/folders which weren't copied from the package by the recipe in the first place. However, the package no longer exists in /vendor when this code runs.

In short,

  1. on composer install the copy-from-package stuff is copied (eg FE assets)
  2. on composer remove there's an error and as a result the composer package is removed, but the recipe is still in symfony.lock (bundle.php entry and copy-from-recipe files get removed correctly)

Unless I'm missing something, the copy-from-package functionality is broken at the moment.

@fabpot mentioned in a comment above that this functionality is in question, but 4 years later it's still there, although not fully working, as evidenced by this issue.
IMO it should either be removed or fixed - at the very least removing a package shouldn't result in an error. Maybe instead of the error, there should be a message explaining that files copied from the package have to be removed manually.

I can provide a PR if you think it makes sense to pursue this.

from flex.

nicolas-grekas avatar nicolas-grekas commented on May 30, 2024

Please provide a PR if you can yes!

from flex.

tperunsky avatar tperunsky commented on May 30, 2024

@nicolas-grekas
There you go #847

from flex.

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.