File tree Expand file tree Collapse file tree 8 files changed +86
-60
lines changed Expand file tree Collapse file tree 8 files changed +86
-60
lines changed Original file line number Diff line number Diff line change 10
10
/CHANGELOG.md export-ignore
11
11
/CONTRIBUTING.md export-ignore
12
12
/phpunit.xml.dist export-ignore
13
+ /composer.build.json export-ignore
14
+ /composer.release.json export-ignore
Original file line number Diff line number Diff line change 2
2
/build
3
3
/vendor
4
4
/.phpunit.result.cache
5
+ /composer.release.json
5
6
/composer.lock
Original file line number Diff line number Diff line change @@ -74,6 +74,23 @@ Afterwards make sure you have the global Composer binaries directory in your ``P
74
74
``` bash
75
75
$ export PATH=" $PATH :$HOME /.composer/vendor/bin"
76
76
```
77
+ ### For Development
78
+
79
+ Because this repo is now a phar-first repo, you need to manually use the dev composer.json:
80
+
81
+ ```
82
+ mv composer.json composer.release.json
83
+ cp composer.build.json composer.json
84
+ composer install
85
+ ```
86
+
87
+ If you wish to build the phar:
88
+
89
+ ```
90
+ ./bin/build-phar.sh
91
+ ```
92
+
93
+ If you wish to test the phar file, it will not work if there is an existing vendor directory.
77
94
78
95
## Usage Example
79
96
@@ -178,6 +195,11 @@ $percent = $number / intval(100);
178
195
```
179
196
would mark 100 as not magic.
180
197
198
+ ## Installation
199
+
200
+
201
+
202
+
181
203
## Contributing
182
204
183
205
Please see [ CONTRIBUTING.md] ( CONTRIBUTING.md ) for more information.
Original file line number Diff line number Diff line change @@ -28,8 +28,15 @@ echo "Running a fresh \`composer install --no-dev\` to insure the latest depende
28
28
echo " Removing vendor/ and composer.lock ..."
29
29
rm -v composer.lock
30
30
rm -rf vendor
31
+ git checkout composer.json
32
+ mv composer.json composer.release.json
33
+ cp composer.build.json composer.json
31
34
composer install --no-dev
32
35
36
+
33
37
# Build the phar
34
38
echo " Building phpmnd.phar..."
35
39
box compile
40
+
41
+ mv composer.release.json composer.json
42
+ rm -rf vendor
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " povils/phpmnd" ,
3
+ "type" : " application" ,
4
+ "description" : " A tool to detect Magic numbers in codebase" ,
5
+ "license" : " MIT" ,
6
+ "authors" : [
7
+ {
8
+ "name" : " Povilas Susinskas" ,
9
+
10
+ }
11
+ ],
12
+ "support" : {
13
+ "issues" : " https://github.com/povils/phpmnd/issues"
14
+ },
15
+ "require" : {
16
+ "php" : " ^7.4 || ^8.0" ,
17
+ "composer-runtime-api" : " ^2.0" ,
18
+ "nikic/php-parser" : " ^4.18 || ^5.0" ,
19
+ "php-parallel-lint/php-console-highlighter" : " ^1.0" ,
20
+ "phpunit/php-timer" : " ^2.0 || ^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0" ,
21
+ "symfony/console" : " ^4.4 || ^5.0 || ^6.0 || ^7.0" ,
22
+ "symfony/finder" : " ^4.4 || ^5.0 || ^6.0 || ^7.0"
23
+ },
24
+ "require-dev" : {
25
+ "phpunit/phpunit" : " ^9.6" ,
26
+ "squizlabs/php_codesniffer" : " ^2.8.1||^3.5"
27
+ },
28
+ "autoload" : {
29
+ "psr-4" : {
30
+ "Povils\\ PHPMND\\ " : " src/"
31
+ }
32
+ },
33
+ "autoload-dev" : {
34
+ "psr-4" : {
35
+ "Povils\\ PHPMND\\ Tests\\ " : " tests/"
36
+ }
37
+ },
38
+ "config" : {
39
+ "sort-packages" : true
40
+ },
41
+ "bin" : [
42
+ " bin/phpmnd" ,
43
+ " bin/phpmnd.phar"
44
+ ],
45
+ "scripts" : {
46
+ "test" : " phpunit" ,
47
+ "cs-check" : " phpcs -p --standard=PSR2 --runtime-set ignore_warnings_on_exit 1 src tests --ignore=tests/Fixtures/Files" ,
48
+ "cs-fix" : " phpcbf -p --standard=PSR2 --runtime-set ignore_errors_on_exit 1 --runtime-set ignore_warnings_on_exit 1 src tests --ignore=tests/Fixtures/Files"
49
+ }
50
+ }
Original file line number Diff line number Diff line change 14
14
},
15
15
"require" : {
16
16
"php" : " ^7.4 || ^8.0" ,
17
- "composer-runtime-api" : " ^2.0" ,
17
+ "composer-runtime-api" : " ^2.0"
18
+ },
19
+ "require-dev" : {
18
20
"nikic/php-parser" : " ^4.18 || ^5.0" ,
19
21
"php-parallel-lint/php-console-highlighter" : " ^1.0" ,
20
22
"phpunit/php-timer" : " ^2.0 || ^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0" ,
21
23
"symfony/console" : " ^4.4 || ^5.0 || ^6.0 || ^7.0" ,
22
- "symfony/finder" : " ^4.4 || ^5.0 || ^6.0 || ^7.0"
23
- },
24
- "require-dev" : {
24
+ "symfony/finder" : " ^4.4 || ^5.0 || ^6.0 || ^7.0" ,
25
25
"phpunit/phpunit" : " ^9.6" ,
26
26
"squizlabs/php_codesniffer" : " ^2.8.1||^3.5"
27
27
},
You can’t perform that action at this time.
0 commit comments