PHP code example of joshdifabio / composed

1. Go to this page and download the library: Download joshdifabio/composed library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

joshdifabio / composed example snippets


$absoluteVendorPath = Composed\VENDOR_DIR;

$absoluteProjectPath = Composed\BASE_DIR;

$authors = Composed\package_config('phpunit/phpunit', 'authors');

assert($authors === [
    [
        'name' => "Sebastian Bergmann",
        'email' => "[email protected]",
        'role' => "lead",
    ],
]);

$licenses = Composed\package_configs('license');

assert($licenses === [
  'joshdifabio/composed' => "MIT",
  'doctrine/instantiator' => "MIT",
  'phpunit/php-code-coverage' => "BSD-3-Clause",
]);

$path = Composed\package('phpunit/phpunit')->getPath('composer.json');

foreach (Composed\packages() as $packageName => $package) {
    $pathToPackageConfig = $package->getPath('composer.json');
    // ...
}

$projectAuthors = Composed\project_config('authors');

assert($projectAuthors === [
    [
        'name' => 'Josh Di Fabio',
        'email' => '[email protected]',
    ],
]);