File: example-01.php

package info (click to toggle)
php-phar-io-manifest 2.0.4-5
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 704 kB
  • sloc: php: 2,228; xml: 291; makefile: 10
file content (24 lines) | stat: -rw-r--r-- 734 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php
/*
 * This file is part of PharIo\Manifest.
 *
 * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

use PharIo\Manifest\ManifestLoader;
use PharIo\Manifest\ManifestSerializer;

require '/usr/share/php/PharIo/Manifest/autoload.php';

$manifest = ManifestLoader::fromFile(__DIR__ . '/../tests/_fixture/phpunit-5.6.5.xml');

echo sprintf(
    "Manifest for %s (%s):\n\n",
    $manifest->getName()->asString(),
    $manifest->getVersion()->getVersionString()
);

echo (new ManifestSerializer)->serializeToString($manifest);