# 職業災害勞工服務資訊整合管理系統 (osha) ###### tags: `4 Upgrade 5` `為客資訊股份有限公司 - PHP 工程師` ___ 另類問題 ``` 看看有沒有幫助,嘗試安裝 勞資會議 出現跟你一樣的問題 1. 到 圖2 時 出現一樣的問題 2. 將 composer.lock 手動刪除(或移動到別的地方,確定沒問題再刪除) ( 我猜 因為 flex 版本 1.10 , 執行 composer install 會先問 omposer.lock) 3. 將 vender/ 手動刪除(或移動到別的地方,確定沒問題再刪除) //在執行 composer install 時,Composer 會先查看 composer.lock 檔案。如果這個檔案存在,Composer 會依照 composer.lock 檔案中鎖定的依賴版本來安裝。 4. 圖0 將 參考 osha 將設定 "symfony/flex": "^1.4", 5. 圖3 執行 composer install 過了,但出現別的錯誤。 ``` ![00](https://hackmd.io/_uploads/SyeV-Q-a0.png) ![11](https://hackmd.io/_uploads/rJxNZXWaR.png) ![22](https://hackmd.io/_uploads/Skl4ZmWTC.png) ![33](https://hackmd.io/_uploads/HkWVZQ-6A.png) ![44](https://hackmd.io/_uploads/BJlVZmZaA.png) ![55](https://hackmd.io/_uploads/HJxEZm-aA.png) --- php 版本 ``` cmd.exe "/k set PATH=C:\php\php8110;%PATH%" ``` --- ## Token Record ``` 202220902 tony.wu@wakeasp.com.tw ``` ``` 安裝 專案 git clone ... composer install yaen install yaen webpack tony.wu@wakeasp.com.tw ``` ___ ### Deprecated-01 ``` User Deprecated: The "Symfony\Component\Debug\DebugClassLoader" class is deprecated since Symfony 4.4, use "Symfony\Component\ErrorHandler\DebugClassLoader" instead. - use Symfony\Component\Debug\Debug; + use Symfony\Component\ErrorHandler\Debug; ``` --- ### Deprecated-05 ``` The "security.firewalls.main.logout_on_user_change" configuration key has been deprecated in Symfony 4.1. - logout_on_user_change: true ``` --- ### deprecation-07 ``` //config\packages\workflow.yaml type: 'single_state' # or 'multiple_state' arguments: - "workflowStatus" 改 type: 'method' # or 'multiple_state' property: "workflowStatus" initial_place 47 改 initial_marking ``` --- 先調整,到 symfony 5.4,要調整的 。 ``` //50 public function getBlockPrefix() { return null; } 改 public function getBlockPrefix(): string { return ''; } ``` ``` //47 protected function voteOnAttribute($attribute, $subject, TokenInterface $token) 改 protected function voteOnAttribute($attribute, $subject, TokenInterface $token): bool /47 protected function supports($attribute, $subject) 改 protected function supports($attribute, $subject): bool public function validatedBy() 改 public function validatedBy(): string public function getTargets() 改 public function getTargets(): string|array //先升,symfony 5.4,後再調整。 public function getTargets() //public function getTargets(): string|array ``` ``` - public static function getSubscribedEvents() + public static function getSubscribedEvents(): array - public function getSubscribedEvents() + public function getSubscribedEvents(): array ``` ``` $this->denyAccessUnlessGranted([ "ROLE_".$functionName."_create", "ROLE_".$functionName."_update", "ROLE_".$functionName."_delete", "ROLE_".$functionName."_read" ]); 改 $this->denyAccessUnlessGranted("ROLE_".$functionName."_create"); $this->denyAccessUnlessGranted("ROLE_".$functionName."_update"); $this->denyAccessUnlessGranted("ROLE_".$functionName."_delete"); $this->denyAccessUnlessGranted("ROLE_".$functionName."_read"); 有 denyAccessUnlessGranted 都做調整。 ``` ``` {{ form_widget(form.transfereeUserID) }} 改 //1040 {% set transfereeUserID = form_widget(form.transfereeUserID) %} // {{ transfereeUserID|raw }} ``` --- ### 調整 ContainerInterface ``` use Psr\Container\ContainerInterface; //CurrencylayerAdapter.php use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface; private $params; ParameterBagInterface $params $this->params = $params; $path = $this->params->get('kernel.project_dir') . "/Resources/data/exchangerates/"; $this->params->get("currencylayer_access_key"), //FileUploader.php $this->params->get("fileUploads_directory"); //'kernel.project_dir' "C:\osha-#1049\osha" //kernel.root_dir "C:\osha-#1049\osha\src" ``` ``` use Symfony\Component\DependencyInjection\ContainerInterface; //WsFunctionsRepository.php use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface; private $checker; , AuthorizationCheckerInterface $checker $this->checker = $checker; $this->container->get('security.authorization_checker') 改 $this->checker //MenuSubscriber.php use Doctrine\ORM\EntityManagerInterface; use Symfony\Component\HttpFoundation\RequestStack; use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface; use Symfony\Component\Routing\RouterInterface; private $em; private $requestStack; private $checker; private $router; EntityManagerInterface $em, RequestStack $requestStack, AuthorizationCheckerInterface $checker, RouterInterface $router $this->em = $em; $this->requestStack = $requestStack; $this->checker = $checker; $this->router = $router; $this->container->get("doctrine")->getManager() 改 $this->em $this->container->get("request_stack") 改 $this->requestStack $this->container->get("translator") 改 $this->translator $this->container->get('router') 改 $this->router $this->container->get('security.authorization_checker') 改 $this->checker //Presenter.php use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface; private $params; ParameterBagInterface $params $this->params = $params; ``` ``` \Symfony\Contracts\Translation\TranslatorInterface 改 use Symfony\Contracts\Translation\TranslatorInterface; TranslatorInterface use Symfony\Component\Translation\TranslatorInterface; 改 use Symfony\Contracts\Translation\TranslatorInterface; ``` --- ### 調整 'App:...' ``` use App\Entity\waAreaCode; 改 use App\Entity\WaAreaCode; ``` ``` 1. "App:WsUser" 改 'App:WsUser' 檢查 use App\Entity\WsUser; 改 WsUser::class 2. "App:WaOrganizations" 改 'App:WaOrganizations' 檢查 use App\Entity\WaOrganizations; 改 WaOrganizations::class 3. "App:WaSubstitude" 改 'App:WaSubstitude' 檢查 use App\Entity\WaSubstitude; 改 WaSubstitude::class 4. "App:WsSelectOptions" 改 'App:WsSelectOptions' 檢查 use App\Entity\WsSelectOptions; 改 WsSelectOptions::class 5. "App:WaCitys" 改 'App:WaCitys' 檢查 use App\Entity\WaCitys; 改 WaCitys::class 6. "App:WaCasesClose" 改 'App:WaCasesClose' 檢查 use App\Entity\WaCasesClose; 改 WaCasesClose::class 7. "App:WaCases" 改 'App:WaCases' 檢查 use App\Entity\WaCases; 改 WaCases::class 8. "App:WaCasesPre" 改 'App:WaCasesPre' 檢查 use App\Entity\WaCasesPre; 改 WaCasesPre::class 9. "App:WaAreaCode" 改 'App:WaAreaCode' 檢查 use App\Entity\WaAreaCode; 改 WaAreaCode::class 10. "App:WaConfig" 改 'App:WaConfig' 檢查 use App\Entity\WaConfig; 改 WaConfig::class 11. "App:WaCasesTransfer" 改 'App:WaCasesTransfer' 檢查 use App\Entity\WaCasesTransfer; 改 WaCasesTransfer::class 12. "App:WaServicePlans" 改 'App:WaServicePlans' 檢查 use App\Entity\WaServicePlans; 改 WaServicePlans::class 13. "App:WaServices" 改 'App:WaServices' 檢查 use App\Entity\WaServices; 改 WaServices::class 14. "App:WaSyncBsudisarec" 改 'App:WaSyncBsudisarec' 檢查 use App\Entity\WaSyncBsudisarec; 改 WaSyncBsudisarec::class 15. "App:WaSyncLabor" 改 'App:WaSyncLabor' 檢查 use App\Entity\WaSyncLabor; 改 WaSyncLabor::class 16. "App:WsOnlineCourse" 改 'App:WsOnlineCourse' 檢查 use App\Entity\WsOnlineCourse; 改 WsOnlineCourse::class 17. "App:WsOnlineCourseUser" 改 'App:WsOnlineCourseUser' 檢查 use App\Entity\WsOnlineCourseUser; 改 WsOnlineCourseUser::class 18. "App:WaFapDeathFinancialAid" 改 'App:WaFapDeathFinancialAid' 檢查 use App\Entity\WaFapDeathFinancialAid; 改 WaFapDeathFinancialAid::class 19. "App:WbCases" 改 'App:WbCases' 檢查 use App\Entity\WbCases; 改 WbCases::class 20. "App:WaWorkflowLog" 改 'App:WaWorkflowLog' 檢查 use App\Entity\WaWorkflowLog; 改 WaWorkflowLog::class 21. "App:WaUserDictionary" 改 'App:WaUserDictionary' 檢查 use App\Entity\WaUserDictionary; 改 WaUserDictionary::class 22 "App:WbCasesPainIndex" 改 'App:WbCasesPainIndex' 檢查 use App\Entity\WbCasesPainIndex; 改 WbCasesPainIndex::class 23. "App:WsCustomer" 改 'App:WsCustomer' 檢查 use App\Entity\WsCustomer; 改 WsCustomer::class 24. "App:WsFunctions" 改 'App:WsFunctions' 檢查 use App\Entity\WsFunctions; 改 WsFunctions::class 25. "App:wsUser" 改 'App:wsUser' 檢查 use App\Entity\WsUser; 改 WsUser::class 26. "App:WcOdIdentificationD4" 改 'App:WcOdIdentificationD4' 檢查 use App\Entity\WcOdIdentificationD4; 改 WcOdIdentificationD4::class 27. "App:WsOnlineCourseUser" 改 'App:WsOnlineCourseUser' 檢查 use App\Entity\WsOnlineCourseUser; 改 WsOnlineCourseUser::class 28. "App:WcCasesReportData" 改 'App:WcCasesReportData' 檢查 use App\Entity\WcCasesReportData; 改 WcCasesReportData::class 29. "App:WcCodeRepWorkSick" 改 'App:WcCodeRepWorkSick' 檢查 use App\Entity\WcCodeRepWorkSick; 改 WcCodeRepWorkSick::class 30. "App:WsIndsCodeV11" 改 'App:WsIndsCodeV11' 檢查 use App\Entity\WsIndsCodeV11; 改 WsIndsCodeV11::class 31. "App:WcOverWorkD" 改 'App:WcOverWorkD' 檢查 use App\Entity\WcOverWorkD; 改 WcOverWorkD::class 32. "App:WcCodeIcd10d" 改 'App:WcCodeIcd10d' 檢查 use App\Entity\WcCodeIcd10d; 改 WcCodeIcd10d::class 33. "App:WsSupplier" 檢查 use App\Entity\WsSupplier; 改 WsSupplier::class 34. "App:WaReportTemplates" 檢查 use App\Entity\WaReportTemplates; 改 WaReportTemplates::class 35. "App:WbForm2Of6" 檢查 use App\Entity\WbForm2Of6; 改 WbForm2Of6::class 36. "App:WbForm3Of5" 檢查 use App\Entity\WbForm3Of5; 改 WbForm3Of5::class 37. "App:WbForm5Of2" 檢查 use App\Entity\WbForm5Of2; 改 WbForm5Of2::class 38. "App:WsLog" 檢查 use App\Entity\WsLog; 改 WsLog::class 39. "App:WcCasesReportData" 檢查 use App\Entity\WcCasesReportData; 改 WcCasesReportData::class 40. "App:WaFapFinancialAid" 檢查 use App\Entity\WaFapFinancialAid; 改 WaFapFinancialAid::class 41. "App:WaServiceTarget" 檢查 use App\Entity\WaServiceTarget; 改 WaServiceTarget::class 42. "App:WsGroups" 檢查 use App\Entity\WsGroups; 改 WsGroups::class 43. "App:waOrganizations" 檢查 use App\Entity\WaOrganizations; 改 WaOrganizations::class 44. 'App:WaInspectSummary' 檢查 use App\Entity\WaInspectSummary; 改 WaInspectSummary::class ``` --- ### 調整 SessionInterface ``` SessionInterface //MS16Controller.php //SessionFirewallSubscriber.php use Symfony\Component\HttpFoundation\RequestStack; private $requestStack; RequestStack $requestStack, $this->requestStack = $requestStack; $request = $this->requestStack->getCurrentRequest(); $request->getSession() ``` ``` //升級後再調整。 use Symfony\Component\HttpFoundation\Session\Flash\FlashBagInterface; 改 use Symfony\Component\HttpFoundation\RequestStack; private $requestStack; RequestStack $requestStack, $this->requestStack = $requestStack; $this->flashBag->add( 改 $this->requestStack->getSession()->getFlashBag()->add( ``` --- ``` git commit -am"#1049 update deprecated" ``` ### symfony 升級到5.4 跟 php 8.1 ``` //刪 "symfony/web-server-bundle": "4.4.*", Symfony\Bundle\WebServerBundle\WebServerBundle::class => ['dev' => true], ``` ``` //composer.json //更新了其他一些以 symfony/* 開頭但不是 Symfony 主要代碼一部分的庫。 將 symfony/ 的 4.4.* 改 5.4.* composer update "symfony/*" 以下需要改 twig 還是需要升..."twig/twig": "^1.0||^2.0" "doctrine/doctrine-bundle": "^1.9", //^2.7 維持 "doctrine/doctrine-migrations-bundle": "^1.0", //^2.2 維持 "phpunit/php-code-coverage": "^7.0.7", //^9.2 "phpunit/php-file-iterator": "^2.0", //^3.0 "sebastian/environment": "^4.2", //^5.1 "phpunit/php-timer": "^2.1", //^5.0.2 "sebastian/comparator": "^3.0", //^4.0.5 "sebastian/diff": "^3.0", //^4.0 "sebastian/resource-operations": "^2.0", //^3.0.3 "gregwar/captcha-bundle": "^2.0", //^2.2 "knplabs/knp-menu-bundle": "^2.2", //3.1 "sensio/framework-extra-bundle": "5.1.*", //^5.0 "phpoffice/phpword": "^0.17.0", //0.18.3 "vich/uploader-bundle": "1.14", //1.* "phar-io/manifest": "^1.0", //2.0.3 "phar-io/version": "^2.0", //3.2.1 "scheb/two-factor-bundle": "^4.18", //^6.3.0 //刪 換 ----------------------------------------------- php 8.1.1 php.ini ;extension=sodium 改 extension=sodium ----------------------------------------------- "mbence/opentbs-bundle": "^1.9", 改 "wakeasp-inc/opentbs-bundle": "^3.13.1", use MBence\OpenTBSBundle\Services\OpenTBS; 改 use Wakeasp\OpenTBSBundle\Services\OpenTBS; MBence\OpenTBSBundle\Services\OpenTBS: '@opentbs' 改 Wakeasp\OpenTBSBundle\Services\OpenTBS: '@opentbs' MBence\OpenTBSBundle\OpenTBSBundle::class => ['all' => true], 改 Wakeasp\OpenTBSBundle\OpenTBSBundle::class => ['all' => true], ----------------------------------------------- "require": "5.4.*" 改 "require": "<=5.4.12" ----------------------------------------------- //composer.json //刪 不能刪 "tecnickcom/tcpdf": "^6.3", //刪 "whiteoctober/tcpdf-bundle": "^1.0", //config\bundles.php //刪 WhiteOctober\TCPDFBundle\WhiteOctoberTCPDFBundle::class => ['all' => true], ----------------------------------------------- - "scheb/two-factor-bundle": "^4.18", + "scheb/2fa-bundle": "^6.3", + "scheb/2fa-google-authenticator": "^6.3", Scheb\TwoFactorBundle\SchebTwoFactorBundle::class => ['all' => true], composer require scheb/2fa-bundle composer require scheb/2fa-google-authenticator //調整 config\packages\scheb_2fa.yaml config\routes\scheb_2fa.yaml ----------------------------------------------- cmd.exe "/k set PATH=C:\php\php8110;%PATH%" //改 php "php": "8.1.1", //run composer update ok ``` --- ``` Attempted to load class "Event" from namespace "Symfony\Component\EventDispatcher".Did you forget a "use" statement for e.g. "Vich\UploaderBundle\Event\Event", "Symfony\Contracts\EventDispatcher\Event" or "Symfony\Component\Workflow\Event\Event"? - use Symfony\Component\EventDispatcher\Event; + use Symfony\Contracts\EventDispatcher\Event; composer up ``` ``` - @TwigBundle/Resources/config/routing/errors.xml + @FrameworkBundle/Resources/config/routing/errors.xml composer up -ok ``` --- ``` symfony serve ``` --- ### Deprecated-01 ``` - public function getTargets() + public function getTargets(): string|array ``` --- ### 升級後再調整 ``` $this->dispatcher->dispatch( MenuEvent::EVENT, new MenuEvent($this->factory, $menu, $request) ); 改 $this->dispatcher->dispatch( new MenuEvent($this->factory, $menu, $request), MenuEvent::EVENT ); ``` ``` Call to a member function getBaseUrl() on null "require": "5.4.*" 改 "require": "<=5.4.12" ``` ``` execute(InputInterface $input, OutputInterface $output) 改 execute(InputInterface $input, OutputInterface $output): ?int 加 return Command::SUCCESS; ``` ``` TransferInfoDataProvider WbRebuildDemandScreeningDataProvider WbRebuildNeedsAssessmentDataProvider WbRebuildServicePlanDataProvider WbRebuildServiceRecordDataProvider WbRebuildTrackingRecordDataProvider WcAllowanceEmploymentDataProvider WcAllowanceFacilityDataProvider WcAllowanceTherapyDataProvider WcAllowanceVisitingDataProvider WcCasesRecordDataProvider WcCasesReportDataDataProvider JsonAuthenticator LoginFormAuthenticator ``` ``` ->getCollection($resourceClass, $operationName, $context); 改 ->getCollection($resourceClass, $operationName); ``` ``` Since symfony/security-bundle 5.3: The child node "encoders" at path "security" is deprecated, use "password_hashers" instead. security.yaml encoders 改 password_hashers ``` ``` MF01Controller.php:356 MF01Controller.php:937 MF03Controller.php:145 MF03Controller.php:1503 MS15Controller.php:303 MainAppController.php:612 OD01Controller.php:554 OR04Controller.php:646 OTDOCController.php:176 MF03Controller.php:1633 OD03Controller.php:329 OR17Controller.php:549 OR18Controller.php:484 OR19Controller.php:538 OR20Controller.php:595 OT01Controller.php:1209 OT01Controller.php:1209 OT01Controller.php:5282 OT23Controller.php:546 OT23Controller.php:546 ``` ``` //HashPasswordListener //HashSignUpPasswordListener //JsonAuthenticator //LoginFormAuthenticator use Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface; 改 use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface; encodePassword 改 hashPassword ``` [安全 http (LogoutUrlGenerator)](https://github.com/symfony/symfony/issues/47577) ``` git commit -am"#1049 升級後的 Deprecated 調整" ``` --- ### 配方升級:symfony/console & bootstrap.php ``` composer recipes:install symfony/console --force -v Created "./bin/console" //留新設定 .env //留就設定 ``` ### 運行時組件 ``` composer require symfony/runtime ``` ``` composer recipes:install symfony/flex --force -v Created "./.env" //留舊設定 ``` --- ``` composer recipes:install symfony/framework-bundle --force -v Created "./config/packages/cache.yaml" //留新設定 Created "./config/packages/framework.yaml" //留新舊設定 Created "./config/preload.php" //留新設定 Created "./config/routes/framework.yaml" //新加的檔案 Created "./config/services.yaml" //留新舊設定 Created "./public/index.php" //留新設定 Created "./src/Controller/.gitignore" //留新舊設定 Created "./src/Kernel.php" //留新設定 刪 "./config/packages/test/framework.yaml" ``` --- ``` git commit -am"#20221019 recipes console flex framework" ``` --- ``` composer recipes:install symfony/twig-bundle --force -v Created "./config/packages/twig.yaml" //留新舊 Created "./templates/base.html.twig" //留舊 刪 "./config/packages/test/twig.yaml" ``` --- ``` composer recipes:install symfony/phpunit-bridge --force -v Created "./.env.test" //留新 Created "./bin/phpunit" //留新 Created "./phpunit.xml.dist" //留新 Created "./tests/bootstrap.php" //留新 .gitignore //留新 ``` --- ``` composer recipes:install symfony/routing --force -v Created "./config/packages/routing.yaml" //留新 Created "./config/routes.yaml" //留舊 刪 "./config/packages/prod/routing.yaml" 刪 "./config/packages/test/routing.yaml" 刪 "./config/packages/dev/routing.yaml" ``` --- ``` composer recipes:install doctrine/annotations --force -v Created "./config/routes/annotations.yaml" ``` --- ``` git commit -am"#20221019 recipes twig phpunit-bridge routing annotations" ``` --- ``` composer recipes:install symfony/security-bundle --force -v Created "./config/packages/security.yaml" //需調整。 anonymous: true 改 lazy: true IS_AUTHENTICATED_ANONYMOUSLY //5.3 改 PUBLIC_ACCESS //5.4 entry_point 往前一個tab ``` [可以僅向斷開連接的用戶授權頁面[重複]](https://stackoverflow.com/questions/70923762/possible-to-authorize-a-page-only-to-the-disconnected-user) --- ``` composer recipes:install doctrine/doctrine-bundle --force -v .env 調整。DATABASE_URL Created "./config/packages/doctrine.yaml" //留新舊 Created "./src/Entity/.gitignore" Created "./src/Repository/.gitignore" //刪 "./config/packages/prod/doctrine.yaml" ``` --- ``` composer recipes:install doctrine/doctrine-fixtures-bundle --force -v Created "./src/DataFixtures/AppFixtures.php" ``` --- ``` composer recipes:install doctrine/doctrine-migrations-bundle --force -v Created "./config/packages/doctrine_migrations.yaml" Created "./migrations/.gitignore" //留新 ``` --- ``` composer recipes:install symfony/debug-bundle --force -v Created "./config/packages/debug.yaml" 刪 "./config/packages/dev/debug.yaml" ``` --- ``` composer recipes:install symfony/lock --force -v Created "./config/packages/lock.yaml" //留舊新 .env 加新設定 ``` --- ``` composer recipes:install symfony/messenger --force -v Created "./config/packages/messenger.yaml" //留舊 ``` --- ``` composer recipes:install symfony/monolog-bundle --force -v Created "./config/packages/monolog.yaml" //刪 "./config/packages/dev/monolog.yaml" "./config/packages/prod/monolog.yaml" "./config/packages/test/monolog.yaml" ``` --- ``` composer recipes:install symfony/swiftmailer-bundle --force -v .env 維持舊設定。 ``` --- ``` composer recipes:install symfony/validator --force -v Created "./config/packages/validator.yaml" //刪 Created "./config/packages/test/validator.yaml" ``` --- ``` composer recipes:install symfony/translation --force -v Created "./config/packages/translation.yaml" //留新舊 Created "./translations/.gitignore" ``` --- ``` composer recipes:install symfony/web-profiler-bundle --force -v Created "./config/packages/web_profiler.yaml" Created "./config/routes/web_profiler.yaml" //刪 "./config/packages/dev/web_profiler.yaml" "./config/packages/test/web_profiler.yaml" ``` --- ``` git commit -am"#1049 recipes finish" ``` --- ``` //WsSignUp //WsUser 加入 getUserIdentifier WsUser 加 PasswordAuthenticatedUserInterface use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface; ``` --- ``` //HashPasswordListener //HashSignUpPasswordListener //JsonAuthenticator //LoginFormAuthenticator use Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface; 改 use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface; encodePassword 改 hashPassword ``` --- ``` //WsSignUp //WsUser.php public function getPassword() 改 public function getPassword(): ?string @return string 改 @return string|null --- * @method string getUserIdentifier() public function __call(string $name, array $arguments) { // TODO: Implement @method string getUserIdentifier() } ``` --- ### 又調整 Deprecated ``` // IsROCDate.php //LaborCheckImportCommand //MF15MonthlyReportCommand //UPSCommand //WaCasesPreDeadlineNoticeCommand //WcOdIdentificationOnlineReviewRecordsCommand execute():int //src\Controller\MF01Controller.php:356 //src\Controller\MF01Controller.php:937 //src\Controller\MainAppController.php:210 //src\Controller\MF02Controller.php:689 //src\Controller\MF03Controller.php:145 //src\Controller\MF03Controller.php:1503 //src\Controller\MF03Controller.php:1633 //src\Controller\MF03Controller.php:1976 //src\Controller\OT26Controller.php:535 //src\Controller\MF07Controller.php:398 //src\Controller\MF09Controller.php:743 //src\Controller\MS15Controller.php:303 //src\Controller\ON07Controller.php:455 //src\Controller\OT01Controller.php:1209 //src\Controller\OT01Controller.php:5282 //src\Controller\OT23Controller.php:546 //src\Controller\OT26Controller.php:535 //src\Controller\OT41Controller.php:694 //src\Controller\OT42Controller.php:694 //src\Controller\OT52Controller.php:616 //src\Controller\OR04Controller.php:659 //src\Controller\OR17Controller.php:556 //src\Controller\OTDOCController.php:176 //src\Controller\OD01Controller.php:554 //src\Controller\OD03Controller.php:329 //src\Controller\MainAppController.php:612 ``` ``` public function getItem(string $resourceClass, $id, string $operationName = null, array $context = []) 改 public function getItem(string $resourceClass, $id, string $operationName = null, array $context = []): ?object ``` ``` public function getCollection(string $resourceClass, string $operationName = null, array $context = []): iterable 改 public function getCollection(string $resourceClass, string $operationName = null, array $context = []) 改 public function getCollection(string $resourceClass, string $operationName = null, array $context = []): iterable ``` ``` //LoginForm //MS10SortForm //MS04SortForm //OT01ASearchForm //NumberType public function getBlockPrefix() 改 public function getBlockPrefix(): string ``` ``` //刪 use Symfony\Component\HttpFoundation\Session\Flash\FlashBagInterface; 換 use Symfony\Component\HttpFoundation\RequestStack; private $requestStack; requestStack $requestStack $this->requestStack = $requestStack; $this->flashBag->add('error', '已超過90天未更換密碼,請更新密碼。'); 改 ($this->requestStack->getSession())->getFlashBag()->add('error', '已超過90天未更換密碼,請更新密碼。'); ``` ``` //templates\OD01\embedForm.html.twig:41 form_row 改 form_errors ``` ``` https://stackoverflow.com/questions/3129458/install-tidy-php https://blog.csdn.net/jfkidear/article/details/7546571 https://yiyingloveart.blogspot.com/2013/03/windows-phptidy.html ``` ``` //php8110/ext/php_tidy.dll //php.ini extension=php_tidy.dll //935 ``` ``` 用戶已棄用:自 symfony/security-core 5.1 起: ROLE_PREVIOUS_ADMIN 角色已棄用並將在 6.0 版中刪除,請改用 IS_IMPERSONATOR 屬性。 ``` ``` git commit -am"#1049 update deprecated" ```