- Issue created by @urvashi_vora
- Status changed to Needs work
about 1 year ago 9:50am 1 November 2023 - š®š³India ashutosh ahirwal India
Provided patch get applied cleanly but still throwing some error.
Used command
./vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,css,js,yml web/modules/custom/migrate_youtubeRemaining issue
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/migrate_youtube/src/Plugin/migrate_plus/data_parser/YoutubeApiJson.php
-----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------------------
81 | ERROR | Function utf8_encode() has been deprecated
-----------------------------------------------------------------------------------------------------------------------------------------------FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/migrate_youtube/src/Plugin/migrate/source/YoutubeApiPlaylistItemsUrl.php
-------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------------------------------
6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\migrate\MigrateException.
-------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------------------------FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/migrate_youtube/src/Plugin/migrate/source/YoutubeApiPlaylistUrl.php
--------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------------------------
6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\migrate\MigrateException.
--------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------------------Time: 152ms; Memory: 10MB
- Status changed to Needs review
about 1 year ago 11:11am 13 November 2023 - š·šŗRussia zniki.ru
Thanks Ashutosh Ahirwal for the feedback.
I was not able to reproduce error message forFunction utf8_encode() has been deprecated
using the same command. But I replaceutf8_encode()
withmb_convert_encoding()
.
New patch and interdiff attached. - šµšPhilippines clarkssquared
Hi
I applied the patch #3 and I confirmed that it fixes all the PHPCS issue hence there are no PHPCS issues being flagged.
ā migrate_youtube git:(1.0.x) curl https://www.drupal.org/files/issues/2023-11-13/3373755-migrate_youtube-cs_fix_3.patch | patch -p1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 2893 100 2893 0 0 6097 0 --:--:-- --:--:-- --:--:-- 6181 patching file 'migrations_examples/README.txt' patching file 'src/Plugin/migrate/source/YoutubeApiPlaylistItemsUrl.php' patching file 'src/Plugin/migrate/source/YoutubeApiPlaylistUrl.php' patching file 'src/Plugin/migrate_plus/data_parser/YoutubeApiJson.php' ā migrate_youtube git:(1.0.x) ā .. ā contrib git:(master) ā phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml migrate_youtube ā contrib git:(master) ā
retaining the status to needs review so that others can give their feedback to patch #3, RTBC +1 for me
- š·šŗRussia zniki.ru
Thanks for review, I fix one more thing, please make a review again.
- First commit to issue fork.
- Status changed to RTBC
about 1 year ago 9:30am 16 November 2023 - thakurnishant_06 India
Hello @zniki,
I have tested the patch for migrating YouTube against version 1.x. It successfully resolves the phpcs errors and warnings reported by PHP CodeSniffer. Moving to RTBC++.
Thank you.