- Issue created by @urvashi_vora
- Status changed to Needs work
about 1 year ago 11:48am 28 September 2023 - š®š³India Ashutosh Ahirwal India
I reviewed attached patch its showing error while applying and didn't get applied cleanly.
Output is
remove_meta_info % git apply -v coding-standard-fixes_4.patch
Checking patch remove_meta_info.info.yml...
error: while searching for:
description: Custom Module created to manage meta-info from head and headers
package: 'Contrib'
type: module
core_version_requirement: ^8 || ^9 || ^10
error: patch failed: remove_meta_info.info.yml:2
error: remove_meta_info.info.yml: patch does not apply
Checking patch remove_meta_info.module...
error: while searching for:/**
* Implements hook_page_attachements_alter().
* @param array $attachments
*/
function remove_meta_info_page_attachments_alter(array &$attachments)
{
foreach ($attachments['#attached']['html_head'] as $key => $attachment) {
if ($attachment[1] == 'system_meta_generator') {
unset($attachments['#attached']['html_head'][$key]);
}
}
}
error: patch failed: remove_meta_info.module:7
error: remove_meta_info.module: patch does not apply
Checking patch src/EventSubscriber/RemoveMetaInfoResponseSubscriber.php...
error: while searching for:
* @param \Symfony\Component\HttpKernel\Event\FilterResponseEvent $event
* The event to process.
*/
public function HeadersManagerOptions(FilterResponseEvent $event)
{
$response = $event->getResponse();
$response->headers->remove('X-Generator');
}error: patch failed: src/EventSubscriber/RemoveMetaInfoResponseSubscriber.php:18
error: src/EventSubscriber/RemoveMetaInfoResponseSubscriber.php: patch does not apply - Status changed to Needs review
about 1 year ago 1:10pm 28 September 2023 - š®š³India sakthi_dev
Created a patch, please review. Also adding screenshot.
- šµšPhilippines clarkssquared
Hi sakthi_dev,
I applied your patch #3 and I confirmed that it resolve all the PHPCS issues.
ā remove_meta_info git:(1.0.x) curl https://www.drupal.org/files/issues/2023-09-28/phpcs-3372170-3.patch | git apply -v % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 3138 100 3138 0 0 10283 0 --:--:-- --:--:-- --:--:-- 10530 Checking patch README.md... Checking patch remove_meta_info.module... Checking patch src/EventSubscriber/RemoveMetaInfoResponseSubscriber.php... Applied patch README.md cleanly. Applied patch remove_meta_info.module cleanly. Applied patch src/EventSubscriber/RemoveMetaInfoResponseSubscriber.php cleanly. ā remove_meta_info git:(1.0.x) ā .. ā contrib git:(master) ā phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml remove_meta_info ā contrib git:(master) ā
retaining the status to needs review, RTBC +1 for me
- š¬š§United Kingdom schillerm
Hi, I also applied the patch to version 1.0.x-dev on a Drupal 10 site.
All PHPCS errors are resolved. RTBC +1 from me. - Status changed to RTBC
about 1 year ago 9:14am 4 October 2023 - š®š³India aayushDrupal
Hi sakthi_dev,
I have applied patch #3 and addressed all the PHPCS issues. I have included a screenshot for your convenience.
Moving to RTBC.
Thank you.