Skip to content
This repository was archived by the owner on Jul 7, 2018. It is now read-only.

Commit 710badf

Browse files
committed
Prepare 0.4.2 release
1 parent 1a4456e commit 710badf

File tree

4 files changed

+124
-11
lines changed

4 files changed

+124
-11
lines changed

package.xml

+7-9
Original file line numberDiff line numberDiff line change
@@ -16,33 +16,31 @@
1616
<email>[email protected]</email>
1717
<active>yes</active>
1818
</lead>
19-
<date>2017-01-15</date>
20-
<time>20:45:14</time>
19+
<date>2017-03-05</date>
20+
<time>22:14:32</time>
2121
<version>
22-
<release>0.4.1</release>
23-
<api>0.4.1</api>
22+
<release>0.4.2</release>
23+
<api>0.4.2</api>
2424
</version>
2525
<stability>
2626
<release>stable</release>
2727
<api>stable</api>
2828
</stability>
2929
<license uri="https://opensource.org/licenses/mit">The MIT License (MIT)</license>
3030
<notes>
31-
- fixes problem when false Ref\NotifierException thrown during object destruction if non-caught exception
32-
was thrown before such destruction (outside notifiers and referent object destructor) (#17);
33-
- do not call soft notifiers if original object was prevented from being destroyed in one of notifiers (#18).
31+
This is a maintenance release which drops PHP &lt; 7.0.3 support.
3432
</notes>
3533
<contents>
3634
<dir name="/">
3735
<!-- begin files list -->
38-
<file name="stubs/composer.json" role="doc" />
3936
<file name="stubs/LICENSE" role="doc" />
4037
<file name="stubs/README.md" role="doc" />
38+
<file name="stubs/composer.json" role="doc" />
4139
<file name="stubs/src/AbstractReference.php" role="doc" />
42-
<file name="stubs/src/functions.php" role="doc" />
4340
<file name="stubs/src/NotifierException.php" role="doc" />
4441
<file name="stubs/src/SoftReference.php" role="doc" />
4542
<file name="stubs/src/WeakReference.php" role="doc" />
43+
<file name="stubs/src/functions.php" role="doc" />
4644
<file name="tests/.stubs.php" role="test" />
4745
<file name="tests/.testsuite.php" role="test" />
4846
<file name="tests/001-extension-loaded.phpt" role="test" />

php_ref.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ extern zend_module_entry php_ref_module_entry;
1919
#define phpext_ref_ptr &php_ref_module_entry
2020

2121
#ifndef PHP_REF_VERSION
22-
#define PHP_REF_VERSION "0.5.0-dev"
22+
#define PHP_REF_VERSION "0.4.2"
2323
#endif
2424

2525
#ifndef PHP_REF_REVISION
26-
#define PHP_REF_REVISION "dev"
26+
#define PHP_REF_REVISION "release"
2727
#endif
2828

2929
#if PHP_VERSION_ID < 70003

scripts/refresh-package-xml.php

+102
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
#!/usr/bin/env php
2+
<?php
3+
4+
/*
5+
* This file is part of the pinepain/php-ref PHP extension.
6+
*
7+
* Copyright (c) 2016-2017 Bogdan Padalko <[email protected]>
8+
*
9+
* Licensed under the MIT license: http://opensource.org/licenses/MIT
10+
*
11+
* For the full copyright and license information, please view the
12+
* LICENSE file that was distributed with this source or visit
13+
* http://opensource.org/licenses/MIT
14+
*/
15+
16+
chdir(__DIR__ . DIRECTORY_SEPARATOR . '..');
17+
18+
$contents = [
19+
'stubs' => 'doc',
20+
'tests' => 'test',
21+
'config.m4' => 'src',
22+
'config.w32' => 'src',
23+
'LICENSE' => 'doc',
24+
'php_ref.h' => 'src',
25+
'php_ref_functions.c' => 'src',
26+
'php_ref_functions.h' => 'src',
27+
'php_ref_notifier_exception.c' => 'src',
28+
'php_ref_notifier_exception.h' => 'src',
29+
'php_ref_reference.c' => 'src',
30+
'php_ref_reference.h' => 'src',
31+
'README.md' => 'doc',
32+
'ref.c' => 'src',
33+
];
34+
35+
$rules = [
36+
'test' => [
37+
'/\.phpt$/',
38+
'/^\..+\.php$/',
39+
],
40+
];
41+
42+
$files = [];
43+
44+
$files[] = '<!-- begin files list -->';
45+
46+
foreach ($contents as $location => $role) {
47+
if (is_dir($location)) {
48+
49+
$dir_files = [];
50+
/** @var SplFileInfo $filename */
51+
foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($location)) as $filename) {
52+
if ($filename->isDir()) {
53+
continue;
54+
}
55+
56+
$location = $filename->getPathname();
57+
58+
if (!is_file($location)) {
59+
throw new Exception("'{$location}' is not a file");
60+
}
61+
62+
63+
if (isset($rules[$role])) {
64+
$matches = false;
65+
foreach ($rules[$role] as $rule) {
66+
if ($matches = preg_match($rule, $filename->getFilename())) {
67+
break;
68+
}
69+
}
70+
71+
if (!$matches) {
72+
continue;
73+
}
74+
}
75+
76+
$dir_files[] = " <file name=\"{$location}\" role=\"{$role}\" />";
77+
}
78+
79+
sort($dir_files);
80+
81+
$files = array_merge($files, $dir_files);
82+
83+
continue;
84+
}
85+
86+
if (!is_file($location)) {
87+
throw new Exception("'{$location}' is not a file");
88+
}
89+
90+
$files[] = " <file name=\"{$location}\" role=\"{$role}\" />";
91+
}
92+
93+
$files[] = ' <!-- end files list -->';
94+
95+
$package = file_get_contents('package.xml');
96+
97+
$start = preg_quote('<!-- begin files list -->');
98+
$end = preg_quote('<!-- end files list -->');
99+
100+
$package = preg_replace("/{$start}.+{$end}/s", implode("\n", $files), $package);
101+
102+
file_put_contents('package-new.xml', $package);

scripts/subsplit.sh

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
3+
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )"
4+
5+
cd $DIR
6+
7+
if [ -d ".subsplit" ]; then
8+
git subsplit update
9+
else
10+
git subsplit init .
11+
fi
12+
13+
git subsplit publish --heads="master" stubs:[email protected]:pinepain/php-ref-stubs.git

0 commit comments

Comments
 (0)