8000 Problem in phar by betzholz · Pull Request #25579 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Problem in phar #25579

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
wants to merge 6 commits into from
Closed

Problem in phar #25579

wants to merge 6 commits into from

Conversation

betzholz
Copy link

If packed into phar the old version creates path like 'file:///phar%3A/'.

Q A
Branch? 3.4
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #...
License MIT
Doc PR symfony/symfony-docs#...

If packed into phar the old version creates path like 'file:///phar%3A/'.
like last commit:
If packed into phar the old version creates path like 'file:///phar%3A/'.
@nicolas-grekas nicolas-grekas added this to the 3.4 milestone Dec 22, 2017
@nicolas-grekas
Copy link
Member

hello, thanks for this PR
it looks like this breaks tests and fabbot, would you mind looking at them?
adding a new test case might also be worth it?

@betzholz
Copy link
Author
betzholz commented Dec 23, 2017

by correcting to fit the tests, i found its only a problem, if the whole project is insite a phar archive and the tempfiles cannot be written (in my case). Probably there is an other case, where temp cannot be written and the file then must be read from insite the phar.
A separte test case will not be this easy.
Will check if this is needed in 4.x?

@nicolas-grekas
Copy link
Member

actually I'm not sure I understand the old code :)
can't we get rid of it and use only your new one? ie not resort to any temp file?

@betzholz
Copy link
Author
betzholz commented Jan 7, 2018

it should work without any problem.
the old code makes tempfiles for files in phar... but sometimes tempfiles are not allowed or not needed

@nicolas-grekas
Copy link
Member

but if it can always work without, why use them in the first place?

@betzholz
Copy link
Author
betzholz commented Jan 7, 2018

there are teo options:

  1. you vode runs in a phar file and you want a resource from the same phar. then my code is the solution
  2. your code wants a single file from a phar file. then the old way is the best. you only has to open the phar once and get your resource as temp. otherwise you alsways need to load the hole phar to only get one.

so i would prefere first to check if it is possible zo get the file out of the phar as tempfile, this brings fever ram and better performance.

@fabpot
Copy link
Member
fabpot commented Jan 17, 2018

It looks like this bug exists in 2.7 as well. @betzholz Can you switch to 2.7 instead? Thanks.

betzholz pushed a commit to betzholz/symfony that referenced this pull request Jan 17, 2018
@betzholz
Copy link
Author

see #25816

@fabpot fabpot closed this Jan 17, 2018
fabpot pushed a commit that referenced this pull request Jan 17, 2018
fabpot added a commit that referenced this pull request Jan 17, 2018
This PR was squashed before being merged into the 2.7 branch (closes #25816).

Discussion
----------

Problem in phar see mergerequest #25579

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

If packed into phar the old version creates path like 'file:///phar%3A/'. see #25579

Commits
-------

3e0c8ff Problem in phar see mergerequest #25579
symfony-splitter pushed a commit to symfony/dependency-injection that referenced this pull request Jan 17, 2018
This PR was squashed before being merged into the 2.7 branch (closes #25816).

Discussion
----------

Problem in phar see mergerequest #25579

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

If packed into phar the old version creates path like 'file:///phar%3A/'. see symfony/symfony#25579

Commits
-------

3e0c8ffb43 Problem in phar see mergerequest #25579
symfony-splitter pushed a commit to symfony/translation that referenced this pull request Jan 17, 2018
This PR was squashed before being merged into the 2.7 branch (closes #25816).

Discussion
----------

Problem in phar see mergerequest #25579

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

If packed into phar the old version creates path like 'file:///phar%3A/'. see symfony/symfony#25579

Commits
-------

3e0c8ffb43 Problem in phar see mergerequest #25579
xabbuh added a commit that referenced this pull request Jan 18, 2018
* 2.7:
  fix the Composer API being used
  [Debug] Always decorate existing exception handlers to deal with fatal errors
  Enableable ArrayNodeDefinition is disabled for empty configuration
  Fixing a bug where the dump() function depended on bundle ordering
  Add nn (Norwegian Nynorsk) translation files, and improve existing file
  Problem in phar see mergerequest #25579
  [Form] Disallow transform dates beyond the year 9999
  Copied NO language files to the new NB locale.
  [Console] Improve phpdoc on StyleInterface::ask()
xabbuh added a commit that referenced this pull request Jan 18, 2018
* 2.8:
  fix the Composer API being used
  [Debug] Always decorate existing exception handlers to deal with fatal errors
  Enableable ArrayNodeDefinition is disabled for empty configuration
  Fixing a bug where the dump() function depended on bundle ordering
  Add nn (Norwegian Nynorsk) translation files, and improve existing file
  Problem in phar see mergerequest #25579
  [Form] Disallow transform dates beyond the year 9999
  Copied NO language files to the new NB locale.
  [Console] Improve phpdoc on StyleInterface::ask()
nicolas-grekas added a commit that referenced this pull request Jan 18, 2018
* 3.3:
  [HttpKernel] DebugHandlersListener should always replace the existing exception handler
  fix the Composer API being used
  [Debug] Always decorate existing exception handlers to deal with fatal errors
  Enableable ArrayNodeDefinition is disabled for empty configuration
  Fixing a bug where the dump() function depended on bundle ordering
  [Cache] Fix handling of apcu_fetch() edgy behavior
  Add nn (Norwegian Nynorsk) translation files, and improve existing file
  Problem in phar see mergerequest #25579
  [Form] Disallow transform dates beyond the year 9999
  Copied NO language files to the new NB locale.
  [Serializer] DateTimeNormalizer handling of null and empty values (returning null or empty instead of new object)
  [Console] Improve phpdoc on StyleInterface::ask()
nicolas-grekas added a commit that referenced this pull request Jan 18, 2018
* 3.4:
  [HttpKernel] DebugHandlersListener should always replace the existing exception handler
  fix the Composer API being used
  [Security] Notify that symfony/expression-language is not installed if ExpressionLanguage and ExpressionLanguagePrivider are used
  [Debug] Always decorate existing exception handlers to deal with fatal errors
  Enableable ArrayNodeDefinition is disabled for empty configuration
  Fixing a bug where the dump() function depended on bundle ordering
  [Cache] Fix handling of apcu_fetch() edgy behavior
  Add nn (Norwegian Nynorsk) translation files, and improve existing file
  Problem in phar see mergerequest #25579
  [Form] Disallow transform dates beyond the year 9999
  Avoid button label translation when it's set to false
  Copied NO language files to the new NB locale.
  [Serializer] DateTimeNormalizer handling of null and empty values (returning null or empty instead of new object)
  Fix options resolver with array allowed types
  [Console] Improve phpdoc on StyleInterface::ask()
  [TwigBridge][WIP] Pass the form-check-inline in parent
nicolas-grekas added a B536 commit that referenced this pull request Jan 18, 2018
* 4.0:
  [HttpKernel] DebugHandlersListener should always replace the existing exception handler
  fix the Composer API being used
  [Security] Notify that symfony/expression-language is not installed if ExpressionLanguage and ExpressionLanguagePrivider are used
  [Debug] Always decorate existing exception handlers to deal with fatal errors
  Enableable ArrayNodeDefinition is disabled for empty configuration
  Fixing a bug where the dump() function depended on bundle ordering
  [Cache] Fix handling of apcu_fetch() edgy behavior
  Add nn (Norwegian Nynorsk) translation files, and improve existing file
  Problem in phar see mergerequest #25579
  [Form] Disallow transform dates beyond the year 9999
  Avoid button label translation when it's set to false
  Copied NO language files to the new NB locale.
  [Serializer] DateTimeNormalizer handling of null and empty values (returning null or empty instead of new object)
  Fix options resolver with array allowed types
  [Console] Improve phpdoc on StyleInterface::ask()
  [TwigBridge][WIP] Pass the form-check-inline in parent
SerhiyMytrovtsiy added a commit to SerhiyMytrovtsiy/translation that referenced this pull request Oct 19, 2022
This PR was squashed before being merged into the 2.7 branch (closes #25816).

Discussion
----------

Problem in phar see mergerequest #25579

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

If packed into phar the old version creates path like 'file:///phar%3A/'. see symfony/symfony#25579

Commits
-------

3e0c8ffb43 Problem in phar see mergerequest #25579
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0