Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OroKernel Doesn' #58

Closed
astorm opened this issue Mar 25, 2014 · 3 comments
Closed

OroKernel Doesn' #58

astorm opened this issue Mar 25, 2014 · 3 comments

Comments

@astorm
Copy link

astorm commented Mar 25, 2014

No description provided.

@astorm
Copy link
Author

astorm commented Mar 25, 2014

The OroKernel::collectBundles method won't find a bundle's bundles.yml file if the bundle lives inside a symlinked folder.

Steps to Reproduce

  1. Create a new bundle in the src folder, enabling it via bundles.yml
  2. Ensure OroCRM or the OroBAP platform application can see the bundle
  3. Move the bundle to a new folder mv src/Pulsestorm/Bundle/Somebundle /some/other/folder/Somebundle
  4. Clear the OroCRM or the OroBAP platform application cache and ensure the application can no longer see the the bundle
  5. Symlink the moved bundle folder lns src/Pulsestorm/Bundle/Somebundle /some/other/folder/Somebundle
  6. Clear the OroCRM or the OroBAP platform application cache

Expected Behavior: The OroCRM or the OroBAP platform application sees the bundle

Actual Behavior: The OroCRM or the OroBAP platform application does not see the bundle

Suggested Fix

It looks like the Symfony\Component\Finder\Finder object does not follow symlinks by default. Adding a call to followLinks should take care of this.

    #File: vendor/oro/platform/src/Oro/Bundle/DistributionBundle/OroKernel.php
    $finder
        ->files()
        ->in(
            array(
                $this->getRootDir() . '/../src',
                $this->getRootDir() . '/../vendor',
            )
        )
        ->followLinks()
        ->name('bundles.yml');

@DimaSoroka
Copy link
Contributor

Thanks @astorm, we'll include the fix into next release.

@rgrebenchuk
Copy link
Contributor

Included to 1.0.0 release. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants