Coder Social home page Coder Social logo

Error: file_put_contents(/m2/app/etc/vendor_path.php): Failed to open stream: No such file or directory about github-actions-m2 HOT 9 OPEN

mcspronko avatar mcspronko commented on August 21, 2024
Error: file_put_contents(/m2/app/etc/vendor_path.php): Failed to open stream: No such file or directory

from github-actions-m2.

Comments (9)

sprankhub avatar sprankhub commented on August 21, 2024

This configuration works for us: https://github.com/customgento/CustomGento_Invoice-m2/blob/3959c742e9147d7dc7afc4a05ade4dc4124d1619/.github/workflows/phpstan.yml

Could you try with a similar one?

from github-actions-m2.

mcspronko avatar mcspronko commented on August 21, 2024

Thanks @sprankhub I will try and let you know.

from github-actions-m2.

mcspronko avatar mcspronko commented on August 21, 2024

Hi @sprankhub thank you for the suggestion, works like a charm!

from github-actions-m2.

sprankhub avatar sprankhub commented on August 21, 2024

Okay, interesting :D So internally, this uses https://github.com/customgento/m2-github-actions/blob/main/.github/workflows/phpstan.yml. The only real difference I see is that it uses PHP 8.2 insteaf of PHP 8.1... 🤔

from github-actions-m2.

mcspronko avatar mcspronko commented on August 21, 2024

Interestingly, it worked fine with the https://github.com/customgento/m2-github-actions/blob/main/.github/workflows/phpstan.yml configuration, but when I tried to add a composer_name it fails with the same error:

name: ExtDN M2 PHPStan
on: [push, pull_request]

jobs:
    phpstan:
        name: M2 PHPStan
        runs-on: ubuntu-latest
        steps:
            - uses: actions/checkout@v4
            - uses: extdn/github-actions-m2/magento-phpstan/8.2@master
              with:
                  composer_name: pronko/workflow-tests-magento-module
Error: file_put_contents(/m2/app/etc/vendor_path.php): Failed to open stream: No such file or directory
Use the `composer fund` command to find out more!

In PluginManager.php(278) : eval()'d code line 323:
                                                                               
  file_put_contents(/m2/app/etc/vendor_path.php): Failed to open stream: No s  
  uch file or directory                                                        

from github-actions-m2.

sprankhub avatar sprankhub commented on August 21, 2024

Then this sounds like a bug to me 🙈

from github-actions-m2.

jissereitsma avatar jissereitsma commented on August 21, 2024

I bumped into this issue myself as well. This is what I found: In the PHPStan Docker image, the Integration Testing Docker image is included. Next, specifically for the PHPStan Docker image, composer is used to install Magento https://github.com/extdn/github-actions-m2/blob/master/magento-phpstan/Dockerfile%3A8.3#L4 This should also include all of the magento2-base files that are copied from vendor/ to the application root, including the file app/etc/vendor_path.php (which is mentioned in this issue). For some reason, the end-result of the Docker image however is a filled vendor/ folder, but no additional files.

I've added a quick workaround https://github.com/extdn/github-actions-m2/blob/master/magento-phpstan/entrypoint.sh#L20 to remove the vendor/ folder and re-add it again. After this, everything works just fine for me.

Does this fix things for you as well?

from github-actions-m2.

sprankhub avatar sprankhub commented on August 21, 2024

It's an ugly one 😂 But it works: https://github.com/customgento/module-default-store-code-remover-m2/actions/runs/9380223585/job/26944378354

from github-actions-m2.

sprankhub avatar sprankhub commented on August 21, 2024

Thanks for looking into this! Do you have any idea for a nicer fix?

from github-actions-m2.

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.