php message php fatal required() failed opening requiredmcloudwwwcmcp-apivendorcomposer..myclabsdeep-copysrcdeepcopydeep_copy.phpanalysis solution
1. View the error log of nginx: php message: php fatal error: require(): failed opening required/mcloud/www/cmcp-api/vendor/composer/../myclabs/deep-copy/src/deepcopy/deep_copy.php. as shown in Figure 1
2. Check the file on gitlab and find the directory: /vendor/composer/../myclabs/deep-copy is an empty directory. as shown in Figure 2
3. Delete the \vendor\myclabs\deep-copy\.git directory. as shown in Figure 3
4. Select the corresponding file and add. as shown in Figure 4
5. Submit. as shown in Figure 5
6. All – Submit – Push. as shown in Figure 6
7. Check the file on gitlab and find the directory: /vendor/composer/../myclabs/deep-copy The corresponding file already exists. as shown in Figure 7
8. Error when building the image: Step 4/7: Copy code /mcloud/www/cmcp-api. Error processing tar file(exit status 1): open /vendor/myclabs/deep-copy/fixtures/f005/foo.php: no such file or directory. as shown in Figure 8
9. Check the file on gitlab and find the file: /vendor/myclabs/deep-copy/fixtures/f005/foo.php exists. as shown in Figure 9
10. Build again, the construction is successful. As shown in Figure 10
11. There are similar problems in the follow-up. as follows:
12. Search in the directory /vendor: .git and find that there are dozens of .gits. I finally decided to delete /vendor, then composer install, reinstall, and then delete .git in each directory. Resubmit the push. as shown in Figure 11
PHP message: PHP Fatal error: require(): Failed opening required '/mcloud/www/cmcp-api/vendor/composer/../paragonie/random_compat/lib/random.php'
PHP message: PHP Fatal error: require(): Failed opening required '/mcloud/www/cmcp-api/vendor/composer/../guzzlehttp/promises/src/functions_include.php'
13. Check the error log of nginx, and no error is reported. in line with expectations.
14. Reference should I submit dependencies in the vendor directory? :https://docs.phpcomposer.com/faqs/should-i-commit-the-dependencies-in-my-vendor-directory.html. I am using the 3rd option. In fact, it feels like the 4th solution will be relatively smaller. as shown in Figure 12











