Skip to content

Commit

Permalink
Merge pull request #341 from loic425/fix/build
Browse files Browse the repository at this point in the history
Fix CI build
  • Loading branch information
loic425 committed Jun 14, 2021
2 parents f5fb2ac + 99f5479 commit b507325
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 69 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -312,11 +312,6 @@ jobs:
if: matrix.symfony != ''
run: composer config extra.symfony.require "${{ matrix.symfony }}"

-
name: Restrict Symfony version
if: matrix.symfony != ''
run: composer config extra.symfony.require "${{ matrix.symfony }}"

-
name: Install certificates
run: symfony server:ca:install
Expand Down Expand Up @@ -406,6 +401,15 @@ jobs:
uses: actions/upload-artifact@v2
if: failure()
with:
name: "Behat logs (JS, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }})"
name: "Behat logs (JS, PHP ${{ matrix.php }})"
path: etc/build/
if-no-files-found: ignore

-
name: Upload Symfony logs
uses: actions/upload-artifact@v2
if: failure()
with:
name: "Symfony logs (JS, PHP ${{ matrix.php }})"
path: var/log/
if-no-files-found: ignore
43 changes: 0 additions & 43 deletions .github/workflows/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,46 +117,3 @@ jobs:
name: Run PHPStan
if: steps.check_phpstan_files.outputs.files_exists == 'true'
run: make test-package-phpstan path=src/Monofony/${{ matrix.package }}

notify-about-build-failure:
runs-on: ubuntu-18.04

if: failure() && (github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'release')

needs: [test]

name: "Notify about build failure"

timeout-minutes: 5

steps:
-
name: "Process data"
id: process-data
shell: bash
run: |
echo "::set-output name=branch::$(echo ${{ github.ref }} | sed 's/refs\/heads\///g' | sed 's/refs\/tags\///g')"
echo "::set-output name=sha::$(echo ${{ github.sha }} | cut -c 1-12)"
-
name: "Notify on Slack"
uses: edge/simple-slack-notify@master
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: env.SLACK_WEBHOOK_URL != null
with:
channel: "#builds"
username: "GitHub Actions"
text: |
*<https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | ${{ github.workflow }} #${{ github.run_number }} build on ${{ github.repository }} repository has failed for ${{ steps.process-data.outputs.branch }} branch.>*
_ _ _ _ _ _ _
color: "danger"
fields: |
[
{ "title": "Repository", "value": "<https://github.com/${{ github.repository }} | ${{ github.repository }}>", "short": true },
{ "title": "Action", "value": "<https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | ${{ github.workflow }} #${{ github.run_number }}>", "short": true },
{ "title": "Reference", "value": "<https://github.com/${{ github.repository }}/tree/${{ steps.process-data.outputs.branch }} | ${{ steps.process-data.outputs.branch }}>", "short": true },
{ "title": "Commit", "value": "<https://github.com/${{ github.repository }}/commit/${{ github.sha }} | ${{ steps.process-data.outputs.sha }}>", "short": true },
{ "title": "Event", "value": "${{ github.event_name }}", "short": true }
]
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@
},
"extra": {
"symfony": {
"allow-contrib": true
"allow-contrib": true,
"require": "4.4.*"
}
}
}
8 changes: 6 additions & 2 deletions public/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@
use Symfony\Component\ErrorHandler\Debug;
use Symfony\Component\HttpFoundation\Request;

require dirname(__DIR__).'/vendor/autoload.php';
if (method_exists(Dotenv::class, 'bootEnv')) {
require dirname(__DIR__).'/vendor/autoload.php';

(new Dotenv())->bootEnv(dirname(__DIR__).'/.env');
(new Dotenv())->bootEnv(dirname(__DIR__).'/.env');
} else {
require dirname(__DIR__).'/config/bootstrap.php';
}

if ($_SERVER['APP_DEBUG']) {
umask(0000);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
{% extends '@SyliusUi/Form/theme.html.twig' %}

{% block form_row -%}
<div class="{% if required %}required {% endif %}field{% if (not compound or force_error|default(false)) and not valid %} error{% endif %}">
{{- form_label(form) -}}
{{- form_widget(form) -}}
{% if form.vars.help ?? false %}
{{- form_help(form) -}}
{% endif %}
{{- form_errors(form) -}}
</div>
{%- endblock form_row %}

{%- block date_widget -%}
<div class="three fields">
{{- form_widget(form.day) -}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ interface AppUserIdAwareInterface
{
public function getAppUserId(): ?int;

public function setAppUserId(?int $shopUserId): void;
public function setAppUserId(?int $appUserId): void;
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@

final class ChangeAppUserPassword implements AppUserIdAwareInterface
{
/** @var int|null */
public $appUserId;
public ?int $appUserId = null;

/**
* @var string|null
Expand All @@ -21,16 +20,14 @@ final class ChangeAppUserPassword implements AppUserIdAwareInterface
*
* @Serializer\Groups({"customer:password:write"})
*/
public $currentPassword;
public ?string $currentPassword;

/**
* @var string|null
*
* @Assert\NotBlank
*
* @Serializer\Groups({"customer:password:write"})
*/
public $newPassword;
public ?string $newPassword;

public function __construct(?string $currentPassword = null, ?string $newPassword = null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Feature: Signing in to the website validation
And I specify the username as "sylius@example.com"
And I specify the password as "sylius"
And I try to log in
Then I should be notified about disabled account
Then I should be notified about bad credentials
And I should not be logged in

@ui
Expand Down
12 changes: 3 additions & 9 deletions symfony.lock
Original file line number Diff line number Diff line change
Expand Up @@ -656,9 +656,6 @@
"sylius/resource-bundle": {
"version": "v1.2.1"
},
"symfony/amqp-messenger": {
"version": "v5.2.1"
},
"symfony/asset": {
"version": "v4.2.0"
},
Expand Down Expand Up @@ -707,9 +704,6 @@
"symfony/doctrine-bridge": {
"version": "v4.2.0"
},
"symfony/doctrine-messenger": {
"version": "v5.2.1"
},
"symfony/dom-crawler": {
"version": "v4.2.0"
},
Expand Down Expand Up @@ -839,6 +833,9 @@
"symfony/polyfill-php80": {
"version": "v1.15.0"
},
"symfony/polyfill-php81": {
"version": "v1.23.0"
},
"symfony/process": {
"version": "v4.2.0"
},
Expand All @@ -851,9 +848,6 @@
"symfony/proxy-manager-bridge": {
"version": "v4.2.0"
},
"symfony/redis-messenger": {
"version": "v5.2.1"
},
"symfony/routing": {
"version": "4.2",
"recipe": {
Expand Down

0 comments on commit b507325

Please sign in to comment.