Skip to content

Commit d7e19e1

Browse files
committed
Completely rewrite package
1 parent 50fb5b1 commit d7e19e1

34 files changed

+520
-597
lines changed

.editorconfig

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
; This file is for unifying the coding style for different editors and IDEs.
2+
; More information at http://editorconfig.org
3+
4+
root = true
5+
6+
[*]
7+
charset = utf-8
8+
indent_size = 4
9+
indent_style = space
10+
end_of_line = lf
11+
insert_final_newline = true
12+
trim_trailing_whitespace = true
13+
14+
[{package.json,*.scss,*.css}]
15+
indent_size = 2
16+
17+
[*.md]
18+
trim_trailing_whitespace = false

.gitattributes

-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
/.gitignore export-ignore
33
/.travis.yml export-ignore
44
/.scrutinizer.yml export-ignore
5-
/phpspec.yml export-ignore
6-
/phpspec-ci.yml export-ignore
75
/phpunit.xml export-ignore
86
/phpunit.xml.dist export-ignore
97
/tests export-ignore
10-
/spec export-ignore

.gitignore

+3-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
/vendor
2-
/.cache
3-
/coverage
4-
coverage.*
5-
composer.phar
6-
composer.lock
72
.idea
8-
.DS_Store
9-
Thumbs.db
3+
composer.lock
4+
phpunit.xml
5+
.phpunit.result.cache

.scrutinizer.yml

+29-19
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,34 @@
11
filter:
22
excluded_paths:
3-
- 'tests/*'
4-
- 'spec/*'
5-
3+
- "tests/"
64
checks:
7-
php:
8-
code_rating: true
9-
duplication: true
10-
11-
coding_style:
125
php:
13-
spaces:
14-
around_operators:
15-
negation: true
16-
6+
code_rating: true
7+
remove_extra_empty_lines: true
8+
remove_php_closing_tag: true
9+
remove_trailing_whitespace: true
10+
fix_use_statements:
11+
remove_unused: true
12+
preserve_multiple: false
13+
preserve_blanklines: true
14+
order_alphabetically: true
15+
fix_php_opening_tag: true
16+
fix_linefeed: true
17+
fix_line_ending: true
18+
fix_identation_4spaces: true
19+
fix_doc_comments: true
1720
build:
18-
tests:
19-
override:
20-
-
21-
command: 'vendor/bin/phpspec run -f progress -c phpspec-ci.yml'
22-
coverage:
23-
file: 'coverage.clover'
24-
format: 'php-clover'
21+
nodes:
22+
analysis:
23+
tests:
24+
override:
25+
- php-scrutinizer-run
26+
27+
tests-and-coverage:
28+
tests:
29+
override:
30+
-
31+
command: 'vendor/bin/phpunit --coverage-clover=coverage.clover'
32+
coverage:
33+
file: 'coverage.clover'
34+
format: 'clover'

.travis.yml

+19-9
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,24 @@
11
language: php
22

33
php:
4-
- 5.4
5-
- 5.5
6-
- 5.6
7-
- 7.0
8-
- 7.1
4+
- 7.2
5+
- 7.3
6+
- 7.4
97

10-
before_script:
11-
- composer self-update
12-
- composer install --prefer-source --no-interaction --dev
8+
env:
9+
- TESTBENCH_VERSION=4.*
1310

14-
script: vendor/bin/phpspec run
11+
before_install:
12+
- travis_retry composer self-update
13+
- composer require "orchestra/testbench:${TESTBENCH_VERSION}" --no-update --dev
14+
15+
install: composer update --prefer-source --no-interaction
16+
17+
sudo: true
18+
19+
cache:
20+
directories:
21+
- $HOME/.composer/cache
22+
23+
script:
24+
- vendor/bin/phpunit

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Changelog
22

3-
All Notable changes to `Flash` will be documented in this file.
3+
All notable changes to `Flash` will be documented in this file.
44

55
## 1.1.0 (2017-06-04)
66

LICENSE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# The MIT License (MIT)
22

3-
Copyright (c) 2015 Ivan Vermeyen (<[email protected]>)
3+
Copyright (c) Ivan Vermeyen (<[email protected]>)
44

55
> Permission is hereby granted, free of charge, to any person obtaining a copy
66
> of this software and associated documentation files (the "Software"), to deal

composer.json

+54-43
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,57 @@
11
{
2-
"name": "codezero/flash",
3-
"description": "Clean flash message system for Laravel.",
4-
"keywords": [
5-
"flash",
6-
"message",
7-
"session",
8-
"form",
9-
"laravel"
10-
],
11-
"license": "MIT",
12-
"authors": [
13-
{
14-
"name": "Ivan Vermeyen",
15-
"email": "[email protected]"
16-
}
17-
],
18-
"require": {
19-
"php": ">=5.4.0"
20-
},
21-
"require-dev": {
22-
"phpspec/phpspec": "~2.0",
23-
"henrikbjorn/phpspec-code-coverage": "~1.0",
24-
"illuminate/session": "~5.0",
25-
"illuminate/support": "~5.0"
26-
},
27-
"autoload": {
28-
"psr-4": {
29-
"CodeZero\\Flash\\": "src/"
2+
"name": "codezero/flash",
3+
"description": "Clean flash message system for Laravel.",
4+
"keywords": [
5+
"flash",
6+
"message",
7+
"session",
8+
"form",
9+
"laravel"
10+
],
11+
"license": "MIT",
12+
"authors": [
13+
{
14+
"name": "Ivan Vermeyen",
15+
"email": "[email protected]"
16+
}
17+
],
18+
"require": {
19+
"php": ">=7.2",
20+
"illuminate/session": ">=6.0",
21+
"illuminate/support": ">=6.0"
3022
},
31-
"files": [
32-
"src//helpers.php"
33-
]
34-
},
35-
"extra": {
36-
"laravel": {
37-
"providers": [
38-
"CodeZero\\Flash\\FlashServiceProvider"
39-
],
40-
"aliases": {
41-
"Flash": "CodeZero\\Flash\\Facade\\Flash"
42-
}
43-
}
44-
},
45-
"minimum-stability": "stable"
23+
"require-dev": {
24+
"orchestra/testbench": ">=4.0",
25+
"phpunit/phpunit": "^9.0"
26+
},
27+
"autoload": {
28+
"psr-4": {
29+
"CodeZero\\Flash\\": "src/"
30+
},
31+
"files": [
32+
"src/helpers.php"
33+
]
34+
},
35+
"autoload-dev": {
36+
"psr-4": {
37+
"CodeZero\\Flash\\Tests\\": "tests"
38+
}
39+
},
40+
"extra": {
41+
"laravel": {
42+
"providers": [
43+
"CodeZero\\Flash\\FlashServiceProvider"
44+
],
45+
"aliases": {
46+
"Flash": "CodeZero\\Flash\\Facades\\Flash"
47+
}
48+
}
49+
},
50+
"config": {
51+
"preferred-install": "dist",
52+
"sort-packages": true,
53+
"optimize-autoloader": true
54+
},
55+
"minimum-stability": "stable",
56+
"prefer-stable": true
4657
}

config/flash.php

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
3+
return [
4+
5+
'sessionKey' => 'flash.notifications',
6+
7+
];

phpspec-ci.yml

-27
This file was deleted.

phpspec.yml

-7
This file was deleted.

phpunit.xml.dist

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit backupGlobals="false"
3+
backupStaticAttributes="false"
4+
bootstrap="vendor/autoload.php"
5+
colors="true"
6+
convertErrorsToExceptions="true"
7+
convertNoticesToExceptions="true"
8+
convertWarningsToExceptions="true"
9+
processIsolation="false"
10+
stopOnFailure="false">
11+
<testsuites>
12+
<testsuite name="Unit">
13+
<directory suffix="Test.php">./tests</directory>
14+
</testsuite>
15+
</testsuites>
16+
<filter>
17+
<whitelist processUncoveredFilesFromWhitelist="true">
18+
<directory suffix=".php">./src</directory>
19+
</whitelist>
20+
</filter>
21+
<php>
22+
<env name="APP_ENV" value="testing"/>
23+
<env name="CACHE_DRIVER" value="array"/>
24+
<env name="SESSION_DRIVER" value="array"/>
25+
<env name="QUEUE_DRIVER" value="sync"/>
26+
</php>
27+
</phpunit>
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<div>
2+
{{ $notification->message }}.
3+
</div>
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@foreach(flash()->notifications() as $notification)
2+
{{ $notification }}
3+
@endforeach
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<div>
2+
{{ $notification->message }}.
3+
</div>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<div>
2+
{{ $notification->message }}.
3+
</div>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<div>
2+
{{ $notification->message }}.
3+
</div>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<div>
2+
{{ $notification->message }}.
3+
</div>

0 commit comments

Comments
 (0)