8000 Broken Kernel Dir after relative paths · Issue #10943 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Broken Kernel Dir after relative paths #10943

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

Closed
ivan1986 opened this issue May 19, 2014 · 11 comments
Closed

Broken Kernel Dir after relative paths #10943

ivan1986 opened this issue May 19, 2014 · 11 comments

Comments

@ivan1986
Copy link

in commit 735e9a4 add use filesystem

wrong way to generate parent dir - not use '../' to up parent, use dirname
current is broken Sensio - generate:bundle - it create bundle in app/cache/dev/../src

old value is
'kernel.root_dir' => '/home/ivan/projects/qs/app',
new
'kernel.root_dir' => __DIR__.'/../..',
need
'kernel.root_dir' => dirname(dirname(__DIR__)),

or some other solution

ivan1986 referenced this issue May 19, 2014
…tainer (fabpot)

This PR was merged into the 2.3 branch.

Discussion
----------

[HttpKernel] removed absolute paths from the generated container

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | first step to resolve #6484, #3079, and #9238
| License       | MIT
| Doc PR        | n/a

This PR converts absolute paths to relative ones in the dumped container. The code is a bit "ugly", but it gets the job done and I'm not sure that there is a more elegant way without breaking everything.

Commits
-------

c1450b4 [HttpKernel] removed absolute paths from the generated container
@ivan1986
Copy link
Author

need remove bootstrap.php.cache for see this bug switch between versions

@mvrhov
Copy link
mvrhov commented May 20, 2014

dirname won't work when the code is inside phar

@ivan1986
Copy link
Author

@mvrhov then may use realpath

@mvrhov
Copy link
mvrhov commented May 20, 2014

Oh. I meant realpath. I don't know about dirname, it has to be tested...

@ivan1986
Copy link
Author

hmm, i never create phar files, but how i know dirname only work whis strings

@fabpot
Copy link
Member
fabpot commented May 20, 2014

Should be fixed now (see #10942).

@ivan1986
Copy link
Author

no, not fixed

@fabpot
Copy link
Member
fabpot commented May 20, 2014

@ivan1986 Can you be a bot more explicit. I've just tried on a new Symfony SE and it works. Don't forget that you need to composer up (composer install won't work).

@fabpot
Copy link
Member
fabpot commented May 20, 2014

@ivan1986 Sorry, this is actually a different problem than #10942.

@aurimasniekis
Copy link
Contributor

Any news? Cant start project with 2.4.5

@fabpot
Copy link
Member
fabpot commented May 26, 2014

Culprit code has been reverted for now in all branches. See #10999 for more information.

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

No branches or pull requests

4 participants
0