Skip to content

Commit

Permalink
Upgrade to PHP 8.1 and higher.
Browse files Browse the repository at this point in the history
  • Loading branch information
prwater committed Feb 7, 2023
1 parent ea60ff0 commit 8204bd0
Show file tree
Hide file tree
Showing 18 changed files with 63 additions and 61 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
/composer.lock
/custom.task.properties
/custom.type.properties
/doc/
/node_modules/
/package-lock.json
/plaisio-assets.csv
Expand Down
41 changes: 22 additions & 19 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,41 +7,44 @@
],
"license": "MIT",
"require": {
"php": ">=7.4",
"php": ">=8.1",
"ext-curl": "*",
"plaisio-ts/helper-cast": "^2.0.0",
"plaisio-ts/kernel": "^2.0.0",
"plaisio/authority-core": "^2.0.1",
"plaisio/babel-core": "^1.8.0",
"plaisio-ts/kernel": "^2.1.0",
"plaisio/authority-core": "^2.1.0",
"plaisio/babel-core": "^2.0.0",
"plaisio/cgi": "^1.2.0",
"plaisio/db-company": "^1.1.0",
"plaisio/db-page": "^0.9.1",
"plaisio/db-profile": "^1.1.0",
"plaisio/db-user": "^1.2.0",
"plaisio/db-page": "^0.9.2",
"plaisio/db-profile": "^1.2.0",
"plaisio/db-user": "^1.3.0",
"plaisio/exception": "^1.1.0",
"plaisio/form": "^0.53.2",
"plaisio/form-louver": "^0.53.1",
"plaisio/form": "^0.54.0",
"plaisio/form-louver": "^0.54.0",
"plaisio/helper-html": "^4.0.0",
"plaisio/helper-ob": "^1.1.1",
"plaisio/kernel": "^3.1.1",
"plaisio/menu": "^1.0.0",
"plaisio/page-core": "^1.4.2",
"plaisio/page-core": "^1.5.0",
"plaisio/page-decorator": "^1.1.0",
"plaisio/response-core": "^2.7.0",
"plaisio/table-detail": "^3.0.1",
"plaisio/table-overview": "^7.4.0",
"plaisio/response-core": "^2.8.0",
"plaisio/table-detail": "^4.0.1",
"plaisio/table-overview": "^8.0.0",
"plaisio/web-assets": "^3.0.0",
"setbased/exception": "^2.2.0",
"setbased/php-stratum-mysql": "^6.5.0"
"setbased/php-stratum-mysql": "^6.6.0"
},
"minimum-stability": "dev",
"prefer-stable": true,
"require-dev": {
"phing/phing": "^3.0.0",
"phpunit/phpunit": "^9.5.27",
"plaisio/console": "^2.8.0",
"plaisio/phing-extensions": "^3.1.0",
"setbased/php-stratum": "^6.2.0"
"phing/phing": "^3.0.0-RC4",
"phpunit/phpunit": "^9.6.3",
"plaisio/console-kernel": "^1.0.1",
"plaisio/console-stratum": "^1.0.0",
"plaisio/console-assets": "^1.0.0",
"plaisio/console-type-script": "^1.0.0",
"plaisio/phing-extensions": "^3.2.0",
"setbased/php-stratum": "^6.3.1"
},
"autoload": {
"psr-4": {
Expand Down
4 changes: 2 additions & 2 deletions src/Form/Control/CoreFieldSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function __construct(?string $name = '')
*
* @return $this
*/
public function addFormControl(Control $control, $label = null, bool $mandatory = false): self
public function addFormControl(Control $control, int|string $label = null, bool $mandatory = false): self
{
$this->addendum[] = ['label' => $label,
'mandatory' => $mandatory];
Expand All @@ -85,7 +85,7 @@ public function addFormControl(Control $control, $label = null, bool $mandatory
*
* @return PushControl
*/
public function addSubmitButton($wrdId, string $name = 'submit'): PushControl
public function addSubmitButton(int|string $wrdId, string $name = 'submit'): PushControl
{
if ($this->buttonGroupControl===null)
{
Expand Down
10 changes: 5 additions & 5 deletions src/Form/CoreForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function __construct(string $name = '', bool $csrfCheckFlag = true)
* </ul>
* @param bool $mandatory Whether the form control is mandatory.
*/
public function addFormControl(Control $control, $label = null, bool $mandatory = false)
public function addFormControl(Control $control, int|string $label = null, bool $mandatory = false)
{
if ($control->isHidden())
{
Expand Down Expand Up @@ -105,10 +105,10 @@ public function addFormControl(Control $control, $label = null, bool $mandatory
*
* @return PushControl
*/
public function addSubmitButton($wrdId,
string $method,
string $name = 'submit',
?string $class = 'btn btn-success'): PushControl
public function addSubmitButton(int|string $wrdId,
string $method,
string $name = 'submit',
?string $class = 'btn btn-success'): PushControl
{
$control = $this->visibleFieldSet->addSubmitButton($wrdId, $name);
$control->setMethod($method);
Expand Down
4 changes: 2 additions & 2 deletions src/Page/Babel/WordDeletePage.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ public function handleRequest(): Response
/**
* Echos the actual page content.
*
* @return void
* @return string|null
*/
protected function htmlTabContent(): ?string
{
// Nothing to do.
return null;
}

//--------------------------------------------------------------------------------------------------------------------
Expand Down
12 changes: 6 additions & 6 deletions src/Page/CoreCorePage.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ protected function getPageTabs(): array
*
* @param int $pagId The ID of the page of the tab.
*
* @return string
* @return string|null
*/
protected function getTabUrl(int $pagId): ?string
{
Expand All @@ -94,7 +94,7 @@ protected function getTabUrl(int $pagId): ?string
/**
* Returns the actual page content.
*
* @return string
* @return string|null
*/
abstract protected function htmlTabContent(): ?string;

Expand Down Expand Up @@ -131,7 +131,7 @@ protected function structAdminMenu(): ?array
*
* @param string|null $htmlContent The actual content of the page.
*
* @return array
* @return array|null
*/
protected function structBody(?string $htmlContent): ?array
{
Expand All @@ -157,7 +157,7 @@ protected function structDashboard(): ?array
*
* @param string|null $htmlContent The actual content of the page.
*
* @return array
* @return array|null
*/
protected function structGridContainer(?string $htmlContent): ?array
{
Expand All @@ -173,7 +173,7 @@ protected function structGridContainer(?string $htmlContent): ?array
*
* @param string|null $htmlContent The actual content of the page.
*
* @return array
* @return array|null
*/
protected function structGridMain(?string $htmlContent): ?array
{
Expand Down Expand Up @@ -278,7 +278,7 @@ protected function structSecondaryMenu(): ?array

//--------------------------------------------------------------------------------------------------------------------
/**
* @return array
* @return array|null
*/
protected function structTrailingJavaScript(): ?array
{
Expand Down
4 changes: 2 additions & 2 deletions src/TableColumn/Babel/WordGroupTableColumn.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ class WordGroupTableColumn extends DualTableColumn
/**
* Object constructor.
*
* @param string|int|null $header The header of this column.
* @param int|string|null $header The header of this column.
* @param int $lanIdTar The ID of the target language.
*/
public function __construct($header, int $lanIdTar)
public function __construct(int|string|null $header, int $lanIdTar)
{
parent::__construct('number', 'text', $header);

Expand Down
4 changes: 2 additions & 2 deletions src/TableColumn/BoolIconTableColumn.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ class BoolIconTableColumn extends UniTableColumn
/**
* Object constructor.
*
* @param string|int|null $header The header text of this table column.
* @param int|string|null $header The header text of this table column.
* @param string $fieldName The key to be used for getting the value from the data row.
* @param bool $showFalse If set for false values an icon is shown, otherwise the cell is empty for
* false values.
*/
public function __construct($header, string $fieldName, bool $showFalse = false)
public function __construct(int|string|null $header, string $fieldName, bool $showFalse = false)
{
parent::__construct('bool', $header);

Expand Down
4 changes: 2 additions & 2 deletions src/TableColumn/Company/CompanyTableColumn.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ class CompanyTableColumn extends DualTableColumn
/**
* Object constructor.
*
* @param string|int|null $header The header of this column.
* @param int|string|null $header The header of this column.
*/
public function __construct($header)
public function __construct(int|string|null $header)
{
parent::__construct('number', 'text', $header);
}
Expand Down
4 changes: 2 additions & 2 deletions src/TableColumn/Company/RoleTableColumn.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ class RoleTableColumn extends DualTableColumn
/**
* Object constructor.
*
* @param string|int|null $header The header of this column.
* @param int|string|null $header The header of this column.
*/
public function __construct($header)
public function __construct(int|string|null $header)
{
parent::__construct('number', 'text', $header);
}
Expand Down
4 changes: 2 additions & 2 deletions src/TableColumn/System/FunctionalityTableColumn.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ class FunctionalityTableColumn extends DualTableColumn
/**
* Object constructor.
*
* @param string|int|null $header The header of this column.
* @param int|string|null $header The header of this column.
*/
public function __construct($header)
public function __construct(int|string|null $header)
{
parent::__construct('number', 'text', $header);
}
Expand Down
4 changes: 2 additions & 2 deletions src/TableColumn/System/ModuleTableColumn.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ class ModuleTableColumn extends DualTableColumn
/**
* Object constructor.
*
* @param string|int|null $header The header of this column.
* @param int|string|null $header The header of this column.
*/
public function __construct($header)
public function __construct(int|string|null $header)
{
parent::__construct('number', 'text', $header);
}
Expand Down
4 changes: 2 additions & 2 deletions src/TableColumn/System/PageTableColumn.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ class PageTableColumn extends DualTableColumn
/**
* Object constructor.
*
* @param string|int|null $header The header of this column.
* @param int|string|null $header The header of this column.
*/
public function __construct($header)
public function __construct(int|string|null $header)
{
parent::__construct('number', 'text', $header);
}
Expand Down
4 changes: 2 additions & 2 deletions src/TableColumn/System/RoleGroupTableColumn.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ class RoleGroupTableColumn extends DualTableColumn
/**
* Object constructor.
*
* @param string|int|null $header The header of this column.
* @param int|string|null $header The header of this column.
*/
public function __construct($header)
public function __construct(int|string|null $header)
{
parent::__construct('number', 'text', $header);
}
Expand Down
4 changes: 2 additions & 2 deletions src/TableRow/System/PageDetailsTableRow.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ class PageDetailsTableRow
* Adds a row with a class name of a page with link to the page details to a detail table.
*
* @param DetailTable $table The (detail) table.
* @param string|int|null $header The row header text.
* @param int|string|null $header The row header text.
* @param array $data The page details.
*/
public static function addRow(DetailTable $table, $header, array $data)
public static function addRow(DetailTable $table, int|string|null $header, array $data): void
{
if ($data['pag_id_org']!==null)
{
Expand Down
12 changes: 6 additions & 6 deletions www/css/Plaisio/Core/Page/3-module/ot-content-types.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,30 @@
vertical-align: middle;
}

.ot-bool,
.ot-cell-bool,
.ot-control-checkbox
{
text-align: center;
vertical-align: middle;
}

.ot-currency,
.ot-number
.ot-cell-currency,
.ot-cell-number
{
text-align: right;
vertical-align: middle;
font-variant-numeric: proportional-nums;
}

.ot-currency:not(:empty):before
.ot-cell-currency:not(:empty):before
{
float: left;
padding-right: 4px;
content: "€";
}

.ot-date,
.ot-datetime
.ot-cell-date,
.ot-cell-datetime
{
text-align: center;
vertical-align: middle;
Expand Down
2 changes: 1 addition & 1 deletion www/js/Plaisio/Core/Page/CoreCorePage.main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ require(['Plaisio/Core/Page/CoreCorePage'],
CorePageDecorator.init();
});

// Plaisio\Console\Helper\TypeScript\TypeScriptMarkHelper::md5: 02bc7a95108cb773dd9c4721e9ebcc8a
// Plaisio\Console\TypeScript\Helper\MarkHelper::md5: 02bc7a95108cb773dd9c4721e9ebcc8a
2 changes: 1 addition & 1 deletion www/js/Plaisio/Core/Page/CoreCorePage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,4 @@ export class CoreCorePage
}

//----------------------------------------------------------------------------------------------------------------------
// Plaisio\Console\Helper\TypeScript\TypeScriptMarkHelper::md5: 73409c9563c19a828449ce57529f6fee
// Plaisio\Console\TypeScript\Helper\MarkHelper::md5: 73409c9563c19a828449ce57529f6fee

0 comments on commit 8204bd0

Please sign in to comment.