circleci-public / sample-php-laravel Goto Github PK
View Code? Open in Web Editor NEWExample CircleCI project using PHP and Laravel
Home Page: https://circleci.com/gh/CircleCI-Public/circleci-demo-php-laravel
Example CircleCI project using PHP and Laravel
Home Page: https://circleci.com/gh/CircleCI-Public/circleci-demo-php-laravel
Hi there!
I'm trying to set up a nightly build for my project and my config looks like this:
version: 2
jobs:
build:
machine: true
steps:
- ...
Then I decided to add a nightly scheduled build to it and found https://circleci.com/docs/2.0/workflows/#scheduling-a-workflow
So I added the nightly
section to the config:
version: 2
jobs:
build:
machine: true
steps:
- ...
nightly:
triggers:
- schedule:
cron: "0 0 * * *"
But it doesn't work.
Thanks in advance!
Can you perhaps demonstrate how to build assets with yarn too as this is a common requirement in Laravel projects.
Simply running yarn install
doesn't work as yarn isn't installed.
I assume we could run a parallel job in a node container but then presumably the result of both containers would need to be merged to run tests against.
For example
composer install
yarn production
phpunit
yarn test
php artisan dusk
The last one needs compiled assets and a working php application.
https://github.com/CircleCI-Public/circleci-demo-php-laravel/issues
The cache name is v1-dependencies-{{ checksum "composer.json" }}
:
Later the name is composer-v1-{{ checksum "composer.lock" }}
:
According to the documentation, keys have to be identical in restore_cache
and save_cache
.
How can the cache be restored if names are different?
When running PHPUnit and having a class extending from TestCase
and using use RefreshDatabase;
for migrations, it returns an error:
Example class:
<?php
namespace Tests\Feature;
use Tests\TestCase;
use Illuminate\Foundation\Testing\RefreshDatabase;
class ExampleTest extends TestCase
{
use RefreshDatabase;
/**
* A basic test example.
*
* @return void
*/
public function testBasicTest()
{
$response = $this->get('/');
$response->assertStatus(200);
}
}
Error:
Illuminate\Database\QueryException: could not find driver (SQL: SHOW FULL TABLES WHERE table_type = 'BASE TABLE')
Is there something to add to the config.yml file?
Hi there,
Thanks for putting this example together, it has been a great help!
It would be really cool if you could extend it to include a mysql container for the DB layer. I think an example that included a second mysql container would cover typical use cases a lot better.
Thanks!
As title, this Laravel framework is not used as the latest stable dependencies.
IMHO, I think we can consider organizing them to the current dependencies.
@ryanwohara. Once this issue is accepted, I can work on this and please add #orbtoberfest
on this issue because of the hacktoberfest circleci :).
Hello guys, is there some official Docker image, same as notnoopci/php:7.1.5-browsers
but from https://hub.docker.com/r/circleci/php/tags/?
I have tried 7.1.5-apache-browsers
but it does not have composer
pre-installed.
per GitHub Security alert, the current version of symfony/http-foundation is vulnerable
CVE-2019-10913 critical severity
GHSA-x92h-wmg2-6hp7
Vulnerable versions: >= 3.0.0, < 3.4.26
Patched version: 3.4.26
In Symfony before 2.7.51, 2.8.x before 2.8.50, 3.x before 3.4.26, 4.x before 4.1.12, and 4.2.x before 4.2.7, HTTP Methods provided as verbs or using the override header may be treated as trusted input, but they are not validated, possibly causing SQL injection or XSS. This is related to symfony/http-foundation.
CVE-2019-18888 moderate severity
GHSA-xhh6-956q-4q69
Vulnerable versions: >= 3.0.0, < 3.4.35
Patched version: 3.4.35
An issue was discovered in Symfony 2.8.0 through 2.8.50, 3.4.0 through 3.4.34, 4.2.0 through 4.2.11, and 4.3.0 through 4.3.7. If an application passes unvalidated user input as the file for which MIME type validation should occur, then arbitrary arguments are passed to the underlying file command. This is related to symfony/http-foundation (and symfony/mime in 4.3.x).
Their suggested remediation is
Upgrade symfony/http-foundation to version 3.4.35 or later. For example:
"require": {
"symfony/http-foundation": "3.4.35"
}
I’m struggling to find any documentation or references on how to run PHPUnit across multiple containers with parallelism.
If I have parallelism: 2
in my .circleci/config.yml file, the whole PHPUnit test suite is ran on both instances. How can I “split” my test suite so that some tests are ran in one container, and the other tests ran in the second container?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.