début migration

This commit is contained in:
Jephté Clain 2024-11-28 15:58:34 +04:00
parent a705eeab02
commit 91500290b3
23 changed files with 97 additions and 239 deletions

8
.idea/.gitignore vendored
View File

@ -1,8 +0,0 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

View File

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Codeception">
<option name="configurations">
<list>
<Configuration>
<option name="path" value="$PROJECT_DIR$/tests" />
</Configuration>
</list>
</option>
</component>
</project>

View File

@ -1,14 +0,0 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="PhpAbstractStaticMethodInspection" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="PhpDocMissingReturnTagInspection" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
<inspection_tool class="PhpDocSignatureInspection" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
<inspection_tool class="PhpSignatureMismatchDuringInheritanceInspection" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="SpellCheckingInspection" enabled="false" level="TYPO" enabled_by_default="false">
<option name="processCode" value="true" />
<option name="processLiterals" value="true" />
<option name="processComments" value="true" />
</inspection_tool>
</profile>
</component>

17
.idea/misc.xml Normal file
View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectInspectionProfilesVisibleTreeState">
<entry key="Project Default">
<profile-state>
<expanded-state>
<State />
</expanded-state>
<selected-state>
<State>
<id>Angular</id>
</State>
</selected-state>
</profile-state>
</entry>
</component>
</project>

View File

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/nur-ture.iml" filepath="$PROJECT_DIR$/.idea/nur-ture.iml" />
</modules>
</component>
</project>

View File

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" packagePrefix="nur\ture\" />
<sourceFolder url="file://$MODULE_DIR$/tests" isTestSource="true" packagePrefix="nur\ture\" />
<sourceFolder url="file://$MODULE_DIR$/nur_src" isTestSource="false" packagePrefix="nur\" />
<sourceFolder url="file://$MODULE_DIR$/nur_tests" isTestSource="true" packagePrefix="nur\" />
<sourceFolder url="file://$MODULE_DIR$/wip" isTestSource="false" packagePrefix="nur\ture\wip\" />
<sourceFolder url="file://$MODULE_DIR$/wip_app" isTestSource="false" packagePrefix="nur\ture\" />
<excludeFolder url="file://$MODULE_DIR$/vendor" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@ -3,7 +3,7 @@
<component name="PhpDockerContainerSettings">
<list>
<map>
<entry key="125ffb9d-fd5f-4e71-8182-94191665795a">
<entry key="c4cf2564-ed91-488c-a93d-fe2daeae80db">
<value>
<DockerContainerSettings>
<option name="version" value="1" />

View File

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="PhpTestFrameworkVersionCache">
<tools_cache>
<tool tool_name="PHPUnit">
<cache>
<versions>
<info id="Local/vendor/autoload.php" version="9.6.20" />
</versions>
</cache>
</tool>
</tools_cache>
</component>
</project>

View File

@ -1,59 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="MessDetectorOptionsConfiguration">
<option name="transferred" value="true" />
</component>
<component name="PHPCSFixerOptionsConfiguration">
<option name="transferred" value="true" />
</component>
<component name="PHPCodeSnifferOptionsConfiguration">
<option name="highlightLevel" value="WARNING" />
<option name="transferred" value="true" />
</component>
<component name="PhpIncludePathManager">
<include_path>
<path value="$PROJECT_DIR$/vendor/phar-io/manifest" />
<path value="$PROJECT_DIR$/vendor/phar-io/version" />
<path value="$PROJECT_DIR$/vendor/nulib/tests" />
<path value="$PROJECT_DIR$/vendor/composer" />
<path value="$PROJECT_DIR$/vendor/sebastian/exporter" />
<path value="$PROJECT_DIR$/vendor/sebastian/code-unit" />
<path value="$PROJECT_DIR$/vendor/sebastian/resource-operations" />
<path value="$PROJECT_DIR$/vendor/sebastian/code-unit-reverse-lookup" />
<path value="$PROJECT_DIR$/vendor/theseer/tokenizer" />
<path value="$PROJECT_DIR$/vendor/sebastian/global-state" />
<path value="$PROJECT_DIR$/vendor/sebastian/complexity" />
<path value="$PROJECT_DIR$/vendor/sebastian/recursion-context" />
<path value="$PROJECT_DIR$/vendor/sebastian/object-enumerator" />
<path value="$PROJECT_DIR$/vendor/sebastian/object-reflector" />
<path value="$PROJECT_DIR$/vendor/sebastian/cli-parser" />
<path value="$PROJECT_DIR$/vendor/sebastian/diff" />
<path value="$PROJECT_DIR$/vendor/sebastian/lines-of-code" />
<path value="$PROJECT_DIR$/vendor/sebastian/type" />
<path value="$PROJECT_DIR$/vendor/sebastian/version" />
<path value="$PROJECT_DIR$/vendor/sebastian/comparator" />
<path value="$PROJECT_DIR$/vendor/sebastian/environment" />
<path value="$PROJECT_DIR$/vendor/doctrine/instantiator" />
<path value="$PROJECT_DIR$/vendor/myclabs/deep-copy" />
<path value="$PROJECT_DIR$/vendor/phpunit/php-timer" />
<path value="$PROJECT_DIR$/vendor/phpunit/php-file-iterator" />
<path value="$PROJECT_DIR$/vendor/phpunit/php-text-template" />
<path value="$PROJECT_DIR$/vendor/phpunit/php-invoker" />
<path value="$PROJECT_DIR$/vendor/phpunit/php-code-coverage" />
<path value="$PROJECT_DIR$/vendor/phpunit/phpunit" />
<path value="$PROJECT_DIR$/vendor/nikic/php-parser" />
</include_path>
</component>
<component name="PhpProjectSharedConfiguration" php_language_level="7.4" />
<component name="PhpStanOptionsConfiguration">
<option name="transferred" value="true" />
</component>
<component name="PhpUnit">
<phpunit_settings>
<PhpUnitSettings custom_loader_path="$PROJECT_DIR$/vendor/autoload.php" phpunit_phar_path="" />
</phpunit_settings>
</component>
<component name="PsalmOptionsConfiguration">
<option name="transferred" value="true" />
</component>
<component name="PhpProjectSharedConfiguration" php_language_level="7.2" />
</project>

View File

@ -1,25 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="PHPSpec">
<suites>
<PhpSpecSuiteConfiguration>
<option name="myPath" value="$PROJECT_DIR$" />
</PhpSpecSuiteConfiguration>
<PhpSpecSuiteConfiguration>
<option name="myPath" value="$PROJECT_DIR$" />
</PhpSpecSuiteConfiguration>
<PhpSpecSuiteConfiguration>
<option name="myPath" value="$PROJECT_DIR$" />
</PhpSpecSuiteConfiguration>
<PhpSpecSuiteConfiguration>
<option name="myPath" value="$PROJECT_DIR$" />
</PhpSpecSuiteConfiguration>
<PhpSpecSuiteConfiguration>
<option name="myPath" value="$PROJECT_DIR$" />
</PhpSpecSuiteConfiguration>
<PhpSpecSuiteConfiguration>
<option name="myPath" value="$PROJECT_DIR$" />
</PhpSpecSuiteConfiguration>
</suites>
</component>
</project>

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

View File

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="WebResourcesPaths">
<contentEntries>
<entry url="file://$PROJECT_DIR$">
<entryData>
<resourceRoots>
<path value="file://$PROJECT_DIR$/nur_public" />
</resourceRoots>
</entryData>
</entry>
</contentEntries>
</component>
</project>

18
.idea/workspace.xml Normal file
View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ComposerSettings">
<execution />
</component>
<component name="PhpWorkspaceProjectConfiguration" interpreter_name="PHP 7.3:d10" />
<component name="ProjectViewState">
<option name="autoscrollFromSource" value="true" />
<option name="autoscrollToSource" value="true" />
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent">{
&quot;keyToString&quot;: {
&quot;settings.editor.selected.configurable&quot;: &quot;preferences.sourceCode&quot;
}
}</component>
</project>

53
bbnurse
View File

@ -150,38 +150,31 @@ function update_mature() {
srcpackage='nur\ture'
destpackage='nulib'
[ -n "$Dest" ] || Dest=.
setx Dest=abspath "$Dest"
if [ -n "$Dest" ]; then
setx Dest=abspath "$Dest"
destdirs=("$Dest")
else
Dest="$(pwd)"
destdirs=()
[ -d src ] && destdirs+=("$Dest/src")
[ -d tests ] && destdirs+=("$Dest/tests")
fi
etitle "Maturation de $srcpackage vers $destpackage"
sdestdir="$Dest/src"
if [ -d "$sdestdir" ]; then
setx rsdestdir=relpath "$sdestdir" "$Dest"
einfo "$rsdestdir"
setx -a sdests=find "$sdestdir" -type f
for sdest in "${sdests[@]}"; do
destname="${sdest#$Dest/src/}"
action "$destname" \
sed -i "s|${srcpackage//\\/\\\\}|${destpackage//\\/\\\\}|g" "$sdest"
done
else
ewarn "$rsdestdir: répertoire non trouvé. il sera ignoré"
fi
tdestdir="$Dest/tests"
if [ -d "$tdestdir" ]; then
setx rtdestdir=relpath "$tdestdir" "$Dest"
einfo "$rtdestdir"
setx -a tdests=find "$tdestdir" -type f
for tdest in "${tdests[@]}"; do
destname="${tdest#$Dest/tests/}"
action "$destname" \
sed -i "s|${srcpackage//\\/\\\\}|${destpackage//\\/\\\\}|g" "$tdest"
done
else
ewarn "$rtdestdir: répertoire non trouvé. il sera ignoré"
fi
eend
for destdir in "${destdirs[@]}"; do
if [ -d "$destdir" ]; then
setx rdestdir=relpath "$destdir" "$Dest"
einfo "$rdestdir"
setx -a dests=find "$destdir" -type f
for dest in "${dests[@]}"; do
destname="${dest#$destdir/}"
action "$destname" \
sed -i "s|${srcpackage//\\/\\\\}|${destpackage//\\/\\\\}|g" "$dest"
done
else
ewarn "$rdestdir: répertoire non trouvé. il sera ignoré"
fi
done
}
action=copy

View File

@ -2,6 +2,13 @@
namespace nur\cli;
use Exception;
use nulib\app\RunFile;
use nulib\ExitError;
use nulib\ext\yaml;
use nulib\output\console as nconsole;
use nulib\output\log as nlog;
use nulib\output\msg as nmsg;
use nulib\output\std\StdMessenger;
use nur\b\ExitError as nur_ExitError;
use nur\b\ValueException;
use nur\config;
@ -10,13 +17,6 @@ use nur\msg;
use nur\os;
use nur\path;
use nur\ture\app;
use nur\ture\app\RunFile;
use nur\ture\ExitError;
use nur\ture\output\console as nconsole;
use nur\ture\output\log as nlog;
use nur\ture\output\msg as nmsg;
use nur\ture\output\std\StdMessenger;
use nur\yaml;
/**
* Class Application: application de base

View File

@ -1,13 +1,16 @@
<?php
namespace nur\ture;
use nulib\app\LockFile;
use nulib\app\RunFile;
use nulib\ExitError;
use nulib\os\path;
use nulib\os\sh;
use nulib\php\func;
use nulib\str;
use nulib\ValueException;
use nur\cli\Application as nur_Application;
use nur\ture\app\cli\Application;
use nur\ture\app\LockFile;
use nur\ture\app\RunFile;
use nur\ture\os\path;
use nur\ture\os\sh;
use nur\ture\php\func;
class app {
private static function isa_Application($app): bool {

View File

@ -2,18 +2,18 @@
namespace nur\ture\app\cli;
use Exception;
use nulib\app\RunFile;
use nulib\ExitError;
use nulib\ext\yaml;
use nulib\output\console;
use nulib\output\log;
use nulib\output\msg;
use nulib\output\std\StdMessenger;
use nulib\ValueException;
use nur\cli\ArgsException;
use nur\cli\ArgsParser;
use nur\config;
use nur\ture\app;
use nur\ture\app\RunFile;
use nur\ture\ExitError;
use nur\ture\output\console;
use nur\ture\output\log;
use nur\ture\output\msg;
use nur\ture\output\std\StdMessenger;
use nur\ture\ValueException;
use nur\yaml;
/**
* Class Application: application de base

View File

@ -3,8 +3,8 @@
require(__DIR__.'/../vendor/autoload.php');
use nur\cli\Application;
use nur\ture\output\msg;
use nur\ture\UserException;
use nulib\output\msg;
use nulib\UserException;
Application::run(new class extends Application {
function main() {

View File

@ -3,9 +3,9 @@
require(__DIR__.'/../vendor/autoload.php');
use nur\cli\Application;
use nur\ture\output\IMessenger;
use nur\ture\output\msg;
use nur\ture\ValueException;
use nulib\output\IMessenger;
use nulib\output\msg;
use nulib\ValueException;
Application::run(new class extends Application {
function main() {

View File

@ -3,9 +3,9 @@
require(__DIR__.'/../vendor/autoload.php');
use nur\cli\Application;
use nur\ture\output\IMessenger;
use nur\ture\output\msg;
use nur\ture\UserException;
use nulib\output\IMessenger;
use nulib\output\msg;
use nulib\UserException;
Application::run(new class extends Application {
function main() {

View File

@ -2,6 +2,6 @@
<?php
require(__DIR__.'/../vendor/autoload.php');
use nur\ture\app\LongTaskApp;
use nulib\app\LongTaskApp;
LongTaskApp::run();

View File

@ -2,8 +2,8 @@
<?php
require(__DIR__.'/../vendor/autoload.php');
use nur\ture\output\std\StdMessenger;
use nur\ture\UserException;
use nulib\output\std\StdMessenger;
use nulib\UserException;
$params = [];
$count = count($argv) - 1;
@ -234,7 +234,7 @@ $msg->section("section", function ($msg) {
$msg->info("info");
$msg->note("note");
$msg->warn("warning");
$msg->warning("warning");
$msg->error("error");
});
});

View File

@ -3,8 +3,8 @@
require(__DIR__.'/../vendor/autoload.php');
use nulib\UserException;
use nur\ture\output\std\StdMessenger;
use nur\ture\output\msg;
use nulib\output\std\StdMessenger;
use nulib\output\msg;
msg::set_messenger(new StdMessenger(), new StdMessenger([
"output" => "output-forever.log",