File tree Expand file tree Collapse file tree 3 files changed +4
-30
lines changed Expand file tree Collapse file tree 3 files changed +4
-30
lines changed Original file line number Diff line number Diff line change 33 "description" : " Enforce architectural constraints in your PHP applications" ,
44 "type" : " library" ,
55 "license" : " MIT" ,
6- "version" : " 0.5.2" ,
76 "authors" : [
87 {
98 "name" : " Pietro Campagnano" ,
6059 "bin" : [
6160 " bin-stub/phparkitect"
6261 ]
63- }
62+ }
Original file line number Diff line number Diff line change 44
55namespace Arkitect \CLI ;
66
7+ use Composer \InstalledVersions ;
8+
79class Version
810{
911 public static function get (): string
1012 {
11- $ pharPath = \Phar::running ();
12-
13- if ($ pharPath ) {
14- $ content = file_get_contents ("$ pharPath/composer.json " );
15- } else {
16- $ phparkitectRootPath = __DIR__ .'/../../ ' ;
17- $ content = file_get_contents ($ phparkitectRootPath .'composer.json ' );
18- }
19-
20- $ composerData = json_decode ($ content , true );
21-
22- return $ composerData ['version ' ] ?? 'UNKNOWN ' ;
13+ return InstalledVersions::getVersion ('phparkitect/phparkitect ' ) ?? 'UNKNOWN ' ;
2314 }
2415}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments