Bug 1326825
| Summary: | Application using assetic autoloader spams logs with no twig installed | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | James Hogarth <james.hogarth> |
| Component: | php-Assetic | Assignee: | James Hogarth <james.hogarth> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | rawhide | CC: | james.hogarth, shawn |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-04-26 00:04:53 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
After discussion we're going to do this for optional includes rather than @include ...
foreach ([
$vendor . '/Foo/Mandatory/autoload.php' => true,
$vendor . '/Bar/Optional/autoload.php' => false,
] as $dep => $mandatory) {
if ($mandatory || file_exists($dep)) require_once($dep);
}
php-Assetic-1.3.2-3.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-661eb12ce9 php-Assetic-1.3.2-3.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-aa2c4e5a81 php-Assetic-1.3.2-3.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-e836555e16 php-Assetic-1.3.2-3.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-661eb12ce9 php-Assetic-1.3.2-3.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-aa2c4e5a81 php-Assetic-1.3.2-3.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-e836555e16 php-Assetic-1.3.2-3.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report. php-Assetic-1.3.2-3.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report. php-Assetic-1.3.2-3.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report. pushed stable and no longer spams logs |
Description of problem: Switching ownCloud over to the specific autoloader method at present and noted that Assetic is spamming the logs with: Apr 13 12:55:56 localhost.localdomain httpd[11285]: {PHP} include_once(): Failed opening '/usr/share/php/Twig/autoload.php' for inclusion (include_path='/usr/share/owncloud/lib/private:/usr/share/owncloud/config:/usr/share/owncloud/3rdparty:/usr/share/owncloud/apps:/var/lib/owncloud/apps:/usr/share/owncloud/lib:.:/usr/share/pear:/usr/share/php:/usr/share/owncloud') at /usr/share/php/Assetic/autoload.php#28 The php-twig library is only a suggests, not a requires or recommends ... and although the autoloader does say @include_once the above gets spammed to the logs. Version-Release number of selected component (if applicable): php-Assetic-1.3.2-1.fc25.noarch How reproducible: Every time from an owncloud install from rawhide Steps to Reproduce: 1. Install owncloud from this scratch build: http://koji.fedoraproject.org/koji/taskinfo?taskID=13645822 2. Follow the logs: journalctl -u httpd -f 3. Open open any owncloud pages and watch the error above appear many, many times. Actual results: Logged spammed Expected results: Nothing logged about the 'missing' php-twig Additional info: Remi did a little benchmarking and believes that file_exists($foo) and require-once($foo) is faster than doing @include_once($foo) anyway, plus that would avoid the unsilent error that appears to be ignoring the @