Skip to content

Instantly share code, notes, and snippets.

@adrianstaffen
Last active June 25, 2021 15:52
Show Gist options
  • Save adrianstaffen/836f87c6ea8973c5b5b034a629d25379 to your computer and use it in GitHub Desktop.
Save adrianstaffen/836f87c6ea8973c5b5b034a629d25379 to your computer and use it in GitHub Desktop.
{
"config": {
"optimize-autoloader": true
},
"repositories": [
{
"type": "path",
"url": "~/st/*",
"options": {
"symlink": true
}
}
],
"require": {
"st/strauss-test-package": "^1.0",
"st/strauss-test-package2": "^1.0"
},
"require-dev": {
"brianhenryie/strauss": "^0.9.0"
},
"scripts": {
"post-install-cmd": [
"vendor/bin/strauss"
],
"post-update-cmd": [
"vendor/bin/strauss"
]
},
"autoload": {
"psr-4": {
"StraussTest\\": "strauss/"
}
},
"extra": {
"strauss": {
"target_directory": "strauss",
"namespace_prefix": "StraussTest\\",
"classmap_prefix": "Strauss_Test_",
"constant_prefix": "ST_",
"packages": [
],
"override_autoload": {
},
"exclude_from_copy": {
"packages": [
],
"namespaces": [
],
"file_patterns": [
]
},
"exclude_from_prefix": {
"packages": [
],
"namespaces": [
],
"file_patterns": [
"/^psr.*$/"
]
},
"namespace_replacement_patterns" : {
},
"delete_vendor_files": false
}
}
}
<?php
/**
* @license proprietary
*
* Modified by __root__ on 25-June-2021 using Strauss.
* @see https://github.com/BrianHenryIE/strauss
*/
namespace StraussTest\ST;
class StraussTestPackage {
public function __construct() {
new \StraussTest\ST\StraussTestPackage2();
\ST\StraussTestPackage2::hello();
}
}
<?php
namespace ST;
class StraussTestPackage {
public function __construct() {
new \ST\StraussTestPackage2();
\ST\StraussTestPackage2::hello();
}
}
<?php
namespace ST;
class StraussTestPackage2 {
public function __construct() {
echo 'hello world';
}
public static function hello() {
echo 'hello world';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment