Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: octobercms/library
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3.x
Choose a base ref
...
head repository: octobercms/library
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 4.x
Choose a head ref
Able to merge. These branches can be automatically merged.

Commits on Oct 17, 2024

  1. Fixes storing an arrays in placeholders

    Eg:
    
    {% put pageTitles = {
          '0':  "Dashboard",
          '1':  "Products",
          '2':  product.name,
        }
    %}
    daftspunk committed Oct 17, 2024
    Copy the full SHA
    6b9e631 View commit details

Commits on Oct 25, 2024

  1. Create report element

    daftspunk committed Oct 25, 2024
    Copy the full SHA
    b5d7637 View commit details

Commits on Oct 31, 2024

  1. Copy the full SHA
    b42f857 View commit details
  2. Dashboard → Dash

    daftspunk committed Oct 31, 2024
    Copy the full SHA
    395016f View commit details
  3. Copy the full SHA
    74c765a View commit details

Commits on Nov 1, 2024

  1. title → label

    daftspunk committed Nov 1, 2024
    Copy the full SHA
    6b365ff View commit details

Commits on Nov 5, 2024

  1. Adds widgetClass

    daftspunk committed Nov 5, 2024
    Copy the full SHA
    7662e28 View commit details

Commits on Nov 6, 2024

  1. Minor

    daftspunk committed Nov 6, 2024
    Copy the full SHA
    22990b6 View commit details

Commits on Nov 20, 2024

  1. Default row should be 1

    daftspunk committed Nov 20, 2024
    Copy the full SHA
    7ad301e View commit details

Commits on Nov 26, 2024

  1. Default max width

    daftspunk committed Nov 26, 2024
    Copy the full SHA
    88a0542 View commit details

Commits on Dec 4, 2024

  1. Copy the full SHA
    7282b80 View commit details
  2. Copy the full SHA
    2f197e5 View commit details

Commits on Jan 5, 2025

  1. Copy the full SHA
    b26af0f View commit details

Commits on Jan 11, 2025

  1. Copy the full SHA
    17a4110 View commit details

Commits on Jan 30, 2025

  1. Docs isModelMultisite

    daftspunk committed Jan 30, 2025
    Copy the full SHA
    6e4b2f8 View commit details

Commits on Mar 1, 2025

  1. Copy the full SHA
    ffa2938 View commit details
  2. Update deps

    daftspunk committed Mar 1, 2025
    Copy the full SHA
    5903226 View commit details
  3. Progress on v4

    daftspunk committed Mar 1, 2025
    Copy the full SHA
    9d1a077 View commit details
  4. Progress on v4

    daftspunk committed Mar 1, 2025
    Copy the full SHA
    06fa70a View commit details
  5. Progress on v4

    daftspunk committed Mar 1, 2025
    Copy the full SHA
    90cec91 View commit details
  6. Refactor for PHP 8.4

    daftspunk committed Mar 1, 2025
    Copy the full SHA
    d220985 View commit details
  7. Refactor for PHP 8.4

    daftspunk committed Mar 1, 2025
    Copy the full SHA
    1a00b45 View commit details

Commits on Mar 2, 2025

  1. Define props

    daftspunk committed Mar 2, 2025
    Copy the full SHA
    99ce852 View commit details

Commits on Mar 3, 2025

  1. PHP 8.4

    daftspunk committed Mar 3, 2025
    Copy the full SHA
    19991de View commit details

Commits on Mar 4, 2025

  1. Copy the full SHA
    9b4ad93 View commit details

Commits on Mar 14, 2025

  1. Copy the full SHA
    42d7c9b View commit details

Commits on Mar 15, 2025

  1. Copy the full SHA
    acdfa40 View commit details
  2. Fixes tests

    daftspunk committed Mar 15, 2025
    Copy the full SHA
    4e4e091 View commit details

Commits on Mar 21, 2025

  1. Copy the full SHA
    e7fe716 View commit details

Commits on Mar 24, 2025

  1. Combiner fix

    daftspunk committed Mar 24, 2025
    Copy the full SHA
    13dad54 View commit details
  2. Adds component parser class

    daftspunk committed Mar 24, 2025
    Copy the full SHA
    974f8c2 View commit details
Showing with 496 additions and 266 deletions.
  1. +2 −15 composer.json
  2. +1 −1 contracts/Database/MultisiteInterface.php
  3. +1 −1 contracts/Element/FilterElement.php
  4. +1 −1 contracts/Element/FormElement.php
  5. +1 −1 contracts/Element/ListElement.php
  6. +0 −3 src/Argon/README.md
  7. +3 −3 src/Assetic/Asset/AssetCache.php
  8. +2 −2 src/Assetic/Asset/AssetCollection.php
  9. +2 −2 src/Assetic/Asset/AssetInterface.php
  10. +2 −2 src/Assetic/Asset/BaseAsset.php
  11. +1 −1 src/Assetic/Asset/FileAsset.php
  12. +2 −2 src/Assetic/Asset/GlobAsset.php
  13. +1 −1 src/Assetic/Asset/HttpAsset.php
  14. +3 −3 src/Assetic/Asset/Iterator/AssetCollectionIterator.php
  15. +1 −1 src/Assetic/Asset/StringAsset.php
  16. +2 −2 src/Assetic/Combiner.php
  17. +1 −1 src/Assetic/Exception/FilterException.php
  18. +1 −1 src/Assetic/Filter/CssImportFilter.php
  19. +3 −2 src/Assetic/Filter/FilterCollection.php
  20. +1 −1 src/Auth/AuthException.php
  21. +1 −1 src/Auth/Models/Role.php
  22. +8 −0 src/Auth/Models/User.php
  23. +1 −1 src/Composer/Concerns/HasOutput.php
  24. +16 −21 src/Database/Builder.php
  25. +2 −2 src/Database/Concerns/HasReplication.php
  26. +3 −4 src/Database/DatabaseServiceProvider.php
  27. +2 −2 src/Database/Dongle.php
  28. +3 −9 src/Database/Model.php
  29. +2 −2 src/Database/Relations/DeferOneOrMany.php
  30. +2 −2 src/Database/Relations/DefinedConstraints.php
  31. +3 −3 src/Database/Replicator.php
  32. +51 −0 src/Element/Dash/ReportDefinition.php
  33. +1 −1 src/Events/PriorityDispatcher.php
  34. +1 −1 src/Exception/ExceptionBase.php
  35. +40 −56 src/Extension/ExtendableTrait.php
  36. +4 −0 src/Filesystem/Filesystem.php
  37. +34 −24 src/Foundation/Application.php
  38. +1 −1 src/Foundation/Bootstrap/LoadConfiguration.php
  39. +4 −0 src/Foundation/Bootstrap/RegisterOctober.php
  40. +36 −0 src/Foundation/Bootstrap/RegisterProviders.php
  41. +53 −0 src/Foundation/Configuration/ApplicationBuilder.php
  42. +1 −1 src/Foundation/Console/Kernel.php
  43. +1 −1 src/Foundation/Http/Kernel.php
  44. +0 −32 src/Foundation/Providers/AppDeferSupportServiceProvider.php
  45. +0 −20 src/Foundation/Providers/AppSupportServiceProvider.php
  46. +4 −7 src/{Argon/ArgonServiceProvider.php → Foundation/Providers/DateServiceProvider.php}
  47. +10 −0 src/Halcyon/Datasource/AutoDatasource.php
  48. +2 −2 src/Halcyon/Datasource/Resolver.php
  49. +1 −1 src/Halcyon/Datasource/ResolverInterface.php
  50. +0 −2 src/Halcyon/HalcyonServiceProvider.php
  51. +7 −3 src/Halcyon/Model.php
  52. +2 −2 src/Html/FormBuilder.php
  53. +1 −1 src/Html/HtmlBuilder.php
  54. +1 −1 src/Mail/Mailer.php
  55. +73 −0 src/Parse/ComponentParser.php
  56. +3 −3 src/Parse/Parsedown/Parsedown.php
  57. +4 −2 src/Parse/Parsedown/ParsedownExtra.php
  58. +1 −2 src/Parse/Twig.php
  59. +5 −0 src/Router/Rule.php
  60. +7 −7 src/{Argon/Argon.php → Support/Date.php}
  61. +60 −0 src/Support/DefaultProviders.php
  62. +1 −0 src/Support/Facades/Currency.php
  63. +10 −0 src/Support/ServiceProvider.php
  64. +3 −3 src/Support/helpers.php
17 changes: 2 additions & 15 deletions composer.json
Original file line number Diff line number Diff line change
@@ -18,17 +18,15 @@
"composer/composer": "^2.0.0",
"doctrine/dbal": "^2.13.3|^3.1.4",
"linkorb/jsmin-php": "~1.0",
"wikimedia/less.php": "~4.1",
"wikimedia/less.php": "~5.2",
"scssphp/scssphp": "~1.0",
"symfony/yaml": "^6.0",
"twig/twig": "~3.0",
"league/csv": "~9.1",
"nesbot/carbon": "^2.0",
"guzzlehttp/guzzle": "^7.5",
"laravel/tinker": "~2.0"
},
"require-dev": {
"laravel/framework": "^9.0|^10.0",
"laravel/framework": "^12.0",
"phpunit/phpunit": "^8.0|^9.0|^10.0",
"meyfa/phpunit-assert-gd": "^2.0.0|^3.0.0",
"phpbench/phpbench": "^1.2"
@@ -60,17 +58,6 @@
"phpbench run tests\\Benchmark\\ --report=default"
]
},
"extra": {
"branch-alias": {
"dev-develop": "3.x-dev"
},
"laravel": {
"providers": [
"October\\Rain\\Foundation\\Providers\\AppSupportServiceProvider",
"October\\Rain\\Foundation\\Providers\\AppDeferSupportServiceProvider"
]
}
},
"minimum-stability": "dev",
"prefer-stable": true
}
2 changes: 1 addition & 1 deletion contracts/Database/MultisiteInterface.php
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ interface MultisiteInterface
/**
* findOrCreateForSite
*/
public function findOrCreateForSite(string $siteId = null);
public function findOrCreateForSite(?string $siteId = null);

/**
* isMultisiteEnabled
2 changes: 1 addition & 1 deletion contracts/Element/FilterElement.php
Original file line number Diff line number Diff line change
@@ -13,5 +13,5 @@ interface FilterElement
/**
* defineScope adds a scope to the filter element
*/
public function defineScope(string $scopeName = null, string $label = null): ScopeDefinition;
public function defineScope(string $scopeName, ?string $label = null): ScopeDefinition;
}
2 changes: 1 addition & 1 deletion contracts/Element/FormElement.php
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ interface FormElement
/**
* addFormField adds a field to the fieldset
*/
public function addFormField(string $fieldName = null, string $label = null): FieldDefinition;
public function addFormField(string $fieldName, ?string $label = null): FieldDefinition;

/**
* getFormFieldset returns the current fieldset definition
2 changes: 1 addition & 1 deletion contracts/Element/ListElement.php
Original file line number Diff line number Diff line change
@@ -13,5 +13,5 @@ interface ListElement
/**
* defineColumn adds a column to the list element
*/
public function defineColumn(string $columnName = null, string $label = null): ColumnDefinition;
public function defineColumn(string $columnName, ?string $label = null): ColumnDefinition;
}
3 changes: 0 additions & 3 deletions src/Argon/README.md

This file was deleted.

6 changes: 3 additions & 3 deletions src/Assetic/Asset/AssetCache.php
Original file line number Diff line number Diff line change
@@ -57,7 +57,7 @@ public function clearFilters()
/**
* load
*/
public function load(FilterInterface $additionalFilter = null)
public function load(?FilterInterface $additionalFilter = null)
{
$cacheKey = self::getCacheKey($this->asset, $additionalFilter, 'load');
if ($this->cache->has($cacheKey)) {
@@ -73,7 +73,7 @@ public function load(FilterInterface $additionalFilter = null)
/**
* dump
*/
public function dump(FilterInterface $additionalFilter = null)
public function dump(?FilterInterface $additionalFilter = null)
{
$cacheKey = self::getCacheKey($this->asset, $additionalFilter, 'dump');
if ($this->cache->has($cacheKey)) {
@@ -190,7 +190,7 @@ public function getValues()
*
* @return string A key for identifying the current asset
*/
protected static function getCacheKey(AssetInterface $asset, FilterInterface $additionalFilter = null, $salt = '')
protected static function getCacheKey(AssetInterface $asset, ?FilterInterface $additionalFilter = null, $salt = '')
{
if ($additionalFilter) {
$asset = clone $asset;
4 changes: 2 additions & 2 deletions src/Assetic/Asset/AssetCollection.php
Original file line number Diff line number Diff line change
@@ -183,7 +183,7 @@ public function clearFilters()
/**
* load
*/
public function load(FilterInterface $additionalFilter = null)
public function load(?FilterInterface $additionalFilter = null)
{
// loop through leaves and load each asset
$parts = [];
@@ -198,7 +198,7 @@ public function load(FilterInterface $additionalFilter = null)
/**
* dump
*/
public function dump(FilterInterface $additionalFilter = null)
public function dump(?FilterInterface $additionalFilter = null)
{
// loop through leaves and dump each asset
$parts = [];
4 changes: 2 additions & 2 deletions src/Assetic/Asset/AssetInterface.php
Original file line number Diff line number Diff line change
@@ -35,7 +35,7 @@ public function clearFilters();
*
* @param FilterInterface $additionalFilter An additional filter
*/
public function load(FilterInterface $additionalFilter = null);
public function load(?FilterInterface $additionalFilter = null);

/**
* Applies dump filters and returns the asset as a string.
@@ -51,7 +51,7 @@ public function load(FilterInterface $additionalFilter = null);
*
* @return string The filtered content of the current asset
*/
public function dump(FilterInterface $additionalFilter = null);
public function dump(?FilterInterface $additionalFilter = null);

/**
* Returns the loaded content of the current asset.
4 changes: 2 additions & 2 deletions src/Assetic/Asset/BaseAsset.php
Original file line number Diff line number Diff line change
@@ -106,7 +106,7 @@ public function clearFilters()
* @param string $content The asset content
* @param FilterInterface $additionalFilter An additional filter
*/
protected function doLoad($content, FilterInterface $additionalFilter = null)
protected function doLoad($content, ?FilterInterface $additionalFilter = null)
{
$filter = clone $this->filters;
if ($additionalFilter) {
@@ -122,7 +122,7 @@ protected function doLoad($content, FilterInterface $additionalFilter = null)
$this->loaded = true;
}

public function dump(FilterInterface $additionalFilter = null)
public function dump(?FilterInterface $additionalFilter = null)
{
if (!$this->loaded) {
$this->load();
2 changes: 1 addition & 1 deletion src/Assetic/Asset/FileAsset.php
Original file line number Diff line number Diff line change
@@ -53,7 +53,7 @@ public function __construct($source, $filters = [], $sourceRoot = null, $sourceP
/**
* load
*/
public function load(FilterInterface $additionalFilter = null)
public function load(?FilterInterface $additionalFilter = null)
{
$source = VarUtils::resolve($this->source, $this->getVars(), $this->getValues());

4 changes: 2 additions & 2 deletions src/Assetic/Asset/GlobAsset.php
Original file line number Diff line number Diff line change
@@ -52,7 +52,7 @@ public function all()
/**
* load
*/
public function load(FilterInterface $additionalFilter = null)
public function load(?FilterInterface $additionalFilter = null)
{
if (!$this->initialized) {
$this->initialize();
@@ -64,7 +64,7 @@ public function load(FilterInterface $additionalFilter = null)
/**
* dump
*/
public function dump(FilterInterface $additionalFilter = null)
public function dump(?FilterInterface $additionalFilter = null)
{
if (!$this->initialized) {
$this->initialize();
2 changes: 1 addition & 1 deletion src/Assetic/Asset/HttpAsset.php
Original file line number Diff line number Diff line change
@@ -53,7 +53,7 @@ public function __construct($sourceUrl, $filters = [], $ignoreErrors = false, ar
/**
* load
*/
public function load(FilterInterface $additionalFilter = null)
public function load(?FilterInterface $additionalFilter = null)
{
$content = @file_get_contents(
VarUtils::resolve($this->sourceUrl, $this->getVars(), $this->getValues())
6 changes: 3 additions & 3 deletions src/Assetic/Asset/Iterator/AssetCollectionIterator.php
Original file line number Diff line number Diff line change
@@ -61,11 +61,11 @@ public function __construct(AssetCollectionInterface $coll, SplObjectStorage $cl
/**
* Returns a copy of the current asset with filters and a target URL applied.
*
* @param Boolean $raw Returns the unmodified asset if true
* @param bool $raw Returns the unmodified asset if true
*
* @return \October\Rain\Assetic\Asset\AssetInterface
*/
public function current($raw = false)
public function current($raw = false): mixed
{
$asset = current($this->assets);

@@ -95,7 +95,7 @@ public function current($raw = false)
return $clone;
}

public function key()
public function key(): mixed
{
return key($this->assets);
}
2 changes: 1 addition & 1 deletion src/Assetic/Asset/StringAsset.php
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@ public function __construct($content, $filters = [], $sourceRoot = null, $source
/**
* load
*/
public function load(FilterInterface $additionalFilter = null)
public function load(?FilterInterface $additionalFilter = null)
{
$this->doLoad($this->string, $additionalFilter);
}
4 changes: 2 additions & 2 deletions src/Assetic/Combiner.php
Original file line number Diff line number Diff line change
@@ -63,7 +63,7 @@ public function prepareCombiner(array $assets, $options = [])
$files = [];
$filesSalt = null;
foreach ($assets as $asset) {
$filters = $this->getFilters(File::extension($asset), $production);
$filters = $this->getFilters(File::extension($asset), (bool) $production);

$path = File::symbolizePath($asset);
if (!file_exists($path) && file_exists($this->localPath . $asset)) {
@@ -190,7 +190,7 @@ public function resetFilters($extension = null)
/**
* getFilters returns all defined filters for a given extension
*/
public function getFilters(string $extension = null, $isProduction = false): array
public function getFilters(?string $extension = null, bool $isProduction = false): array
{
if ($isProduction) {
if ($extension === null) {
2 changes: 1 addition & 1 deletion src/Assetic/Exception/FilterException.php
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ class FilterException extends \RuntimeException implements Exception
private $originalMessage;
private $input;

public function __construct($message, $code = 0, \Exception $previous = null)
public function __construct($message, $code = 0, ?\Exception $previous = null)
{
parent::__construct($message, $code, $previous);

2 changes: 1 addition & 1 deletion src/Assetic/Filter/CssImportFilter.php
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@ class CssImportFilter extends BaseCssFilter implements HashableInterface, Depend
*
* @param FilterInterface $importFilter Filter for each imported asset
*/
public function __construct(FilterInterface $importFilter = null)
public function __construct(?FilterInterface $importFilter = null)
{
$this->importFilter = $importFilter ?: new CssRewriteFilter();
}
5 changes: 3 additions & 2 deletions src/Assetic/Filter/FilterCollection.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php namespace October\Rain\Assetic\Filter;

use October\Rain\Assetic\Asset\AssetInterface;
use Traversable;

/**
* FilterCollection is a collection of filters.
@@ -59,12 +60,12 @@ public function filterDump(AssetInterface $asset)
}
}

public function getIterator()
public function getIterator(): Traversable
{
return new \ArrayIterator($this->filters);
}

public function count()
public function count(): int
{
return count($this->filters);
}
2 changes: 1 addition & 1 deletion src/Auth/AuthException.php
Original file line number Diff line number Diff line change
@@ -47,7 +47,7 @@ class AuthException extends ApplicationException
* @param int $code
* @param Exception $previous
*/
public function __construct($message = '', $code = 0, Exception $previous = null)
public function __construct($message = '', $code = 0, ?Exception $previous = null)
{
if ($this->useSoftErrors()) {
$message = static::$errorMessage;
2 changes: 1 addition & 1 deletion src/Auth/Models/Role.php
Original file line number Diff line number Diff line change
@@ -178,7 +178,7 @@ public function hasAnyAccess(array $permissions)

/**
* setPermissionsAttribute validates the permissions when set
* @param array $permissions
* @param string $permissions
* @return void
*/
public function setPermissionsAttribute($permissions)
8 changes: 8 additions & 0 deletions src/Auth/Models/User.php
Original file line number Diff line number Diff line change
@@ -670,6 +670,14 @@ public function getAuthIdentifierName()
return $this->getKeyName();
}

/**
* getAuthPasswordName of the password attribute for the user.
*/
public function getAuthPasswordName()
{
return 'password';
}

/**
* getAuthIdentifier gets the unique identifier for the user
* @return mixed
2 changes: 1 addition & 1 deletion src/Composer/Concerns/HasOutput.php
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@ trait HasOutput
/**
* setOutput
*/
public function setOutput(IOInterface $output = null)
public function setOutput(?IOInterface $output = null)
{
if ($output === null) {
$this->output = new NullIO();
37 changes: 16 additions & 21 deletions src/Database/Builder.php
Original file line number Diff line number Diff line change
@@ -164,7 +164,7 @@ protected function searchWhereInternal($term, $columns, $mode, $boolean)
* @param int $page
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator
*/
public function paginate($perPage = null, $columns = ['*'], $pageName = 'page', $page = null)
public function paginate($perPage = null, $columns = ['*'], $pageName = 'page', $page = null, $total = null)
{
// Legacy signature support
// paginate($perPage, $page, $columns, $pageName)
@@ -178,18 +178,17 @@ public function paginate($perPage = null, $columns = ['*'], $pageName = 'page',
$page = is_array($_currentPage) ? null : $_currentPage;
}

if (!$page) {
$page = Paginator::resolveCurrentPage($pageName);
}
$page = $page ?: Paginator::resolveCurrentPage($pageName);

if (!$perPage) {
$perPage = $this->model->getPerPage();
}
$total = value($total) ?? $this->toBase()->getCountForPagination();

$total = $this->toBase()->getCountForPagination();
$this->forPage((int) $page, (int) $perPage);
$perPage = value($perPage, $total) ?: $this->model->getPerPage();

return $this->paginator($this->get($columns), $total, $perPage, $page, [
$results = $total
? $this->forPage($page, $perPage)->get($columns)
: $this->model->newCollection();

return $this->paginator($results, $total, $perPage, $page, [
'path' => Paginator::resolveCurrentPath(),
'pageName' => $pageName
]);
@@ -204,31 +203,27 @@ public function paginate($perPage = null, $columns = ['*'], $pageName = 'page',
* @param int $currentPage
* @return \Illuminate\Contracts\Pagination\Paginator
*/
public function simplePaginate($perPage = null, $columns = ['*'], $pageName = 'page', $currentPage = null)
public function simplePaginate($perPage = null, $columns = ['*'], $pageName = 'page', $page = null)
{
// Legacy signature support
// paginate($perPage, $currentPage, $columns, $pageName)
if (!is_array($columns)) {
$_currentPage = $columns;
$_columns = $pageName;
$_pageName = $currentPage;
$_pageName = $page;

$columns = is_array($_columns) ? $_columns : ['*'];
$pageName = $_pageName !== null ? $_pageName : 'page';
$currentPage = is_array($_currentPage) ? null : $_currentPage;
$page = is_array($_currentPage) ? null : $_currentPage;
}

if (!$currentPage) {
$currentPage = Paginator::resolveCurrentPage($pageName);
}
$page = $page ?: Paginator::resolveCurrentPage($pageName);

if (!$perPage) {
$perPage = $this->model->getPerPage();
}
$perPage = $perPage ?: $this->model->getPerPage();

$this->skip(($currentPage - 1) * $perPage)->take($perPage + 1);
$this->skip(($page - 1) * $perPage)->take($perPage + 1);

return $this->simplePaginator($this->get($columns), $perPage, $currentPage, [
return $this->simplePaginator($this->get($columns), $perPage, $page, [
'path' => Paginator::resolveCurrentPath(),
'pageName' => $pageName
]);
Loading