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

Minified PHP files issue #3893

Closed
chris-brabender opened this issue Mar 24, 2016 · 3 comments
Closed

Minified PHP files issue #3893

chris-brabender opened this issue Mar 24, 2016 · 3 comments
Assignees

Comments

@chris-brabender
Copy link

When magento 2 minifies PHP files into the view_preprocessed folder it seems to have a bit of a bug when it comes to comments.

If a PHP file contains a commented line starting with # or // it comments out all subsequent lines.

EG:

# commented out line
$newVar = 'blah';

Gets minified into this:

# commented out line $newVar = 'blah';

Which effectively comments out everything after the commented line.

Is there a requirement to minify PHP blocks in these files?

@chris-brabender
Copy link
Author

I have found another instance of this that is slightly different.

A template for a third party module we've been working with has something along the lines of this in javascript in a template file:

s.src = '//<?php echo $block->getSomevar() ?>.example.com/jsfile.js';

When magento minifies this it becomes

s.src = ' ?>.example.com/jsfile.js';

@PieterCappelle
Copy link
Contributor

This issue is related with my issue #4490.

@guz-anton
Copy link
Contributor

Hi @chris-brabender ,
You can find that issue was fixed for Magento 2.1 under #4365.

Please retest you own. I'm going to close issue Fill free to comment here some issues still exist.

magento-engcom-team pushed a commit that referenced this issue Mar 13, 2019
[EngCom] Public Pull Requests - GraphQL
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