php-docs-samples icon indicating copy to clipboard operation
php-docs-samples copied to clipboard

feat: Laravel on Cloud Run

Open glasnt opened this issue 3 years ago • 3 comments

Code and README-based tutorial for Laravel on Cloud Run

Includes some region tags as highlighted in "Understanding the code".

(View to possibly migrate README tutorial to DevSite, but if that happens I'll submit another PR to redirect readers to that version)

glasnt avatar Aug 29 '22 23:08 glasnt

Here is the summary of changes.

You are about to add 2 region tags.

This comment is generated by snippet-bot. If you find problems with this result, please file an issue at: https://github.com/googleapis/repo-automation-bots/issues. To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • [ ] Refresh this comment

snippet-bot[bot] avatar Aug 29 '22 23:08 snippet-bot[bot]

Unsure why linting is failing.


Files that were not fixed due to errors reported during linting before fixing:
   1) /tmpfs/src/github/php-docs-samples/run/laravel/app/Providers/RouteServiceProvider.php

glasnt avatar Aug 29 '22 23:08 glasnt

@glasnt I believe that is happening due to the use of ?-> operator in the RouteServiceProvider.php file. This was introduced in PHP 8, while the linter is running an image containing PHP 7.4 see this.

When I ran the fixer on your PR locally with PHP 7.3 in verbose mode I got the "Invalid file syntax" error. On PHP 8.1 there were no changes.

Now, since this RouteServiceProvider.php is provided by the framework itself, we can either,

  1. Ignore this and force merge.
  2. Downgrade the Laravel version to be the one compatible to PHP 7.4.
  3. Add an exclusion in the config file for php-cs-fixer.

@bshaffer Does this look right?

saranshdhingra avatar Sep 12 '22 15:09 saranshdhingra

tests all pass now 🥳

glasnt avatar Nov 04 '22 04:11 glasnt

One noop comment, I'm happy with this being merged when you are.

glasnt avatar Dec 13 '22 00:12 glasnt