a77c0ac6a3/composer.json (L15)
Follow-up PR from #18. Apparently we can't put things in the root namespace because of this. Maybe we can investigate this more but for now we have to keep the main Scaffold class under the original namespace `vlw\Scaffold\Scaffold`
Reviewed-on: https://codeberg.org/vlw/scaffold/pulls/20
We're moving all classes one namespace layer up (with the exception for extending Database classes. This makes it less verbose and probably save a few seconds to type every time.
Reviewed-on: https://codeberg.org/vlw/scaffold/pulls/18
This PR adds a `UUID::v7()` method for generating version 7 UUIDs, which have several performace advantages over v4 when stored in database indecies.
Reviewed-on: https://codeberg.org/vlw/scaffold/pulls/17
Closes#14
From the example in the issue, this can now be fixed like this:
```php
final public DateTimeImmutable $date_created {
get => new DateTimeImmutable($this->get(Fields::DATE_CREATED->value));
set (DateTimeImmutable $date_created) => new DateTimeImmutable(
$this->set(Fields::DATE_CREATED->value,
$date_created->format(Database::DATETIME_FORMAT)
));
}
```
Reviewed-on: https://codeberg.org/vlw/scaffold/pulls/16
This PR adds a new class for holding license constants, which is read by extensions like LibreJS to check that the site contains free JavaScript code.
Reviewed-on: https://codeberg.org/vlw/scaffold/pulls/15
This PR adds a new database boilerplate for manipulating data stored in a database through an instanced database Model. The only method implemented by this class so far is `Controller()->update()`. It can be used to patch column values for a database row given an instanced `vlw\Database\Model`. An associative array of column keys and values are then passed to the update method.
Reviewed-on: https://codeberg.org/vlw/scaffold/pulls/13
Let's expose the uuid helpers as a class of static methods instead. I'm not sure if this approach is actually better but we're going to live with it for a while. I have done UUID helpers before this library as a class. So let's run with it again.
Reviewed-on: https://codeberg.org/vlw/scaffold/pulls/10
This change is primarily to accommodate the new `Reflect::serialize()` method since we don't want to include the isset property when returning serialized objects.
Reviewed-on: https://codeberg.org/vlw/scaffold/pulls/9
Restores the class method approach for loading source files from #2, which undoes the changes introduced in #3. I can't figure out a way to make the function load before initialization of downstream classes.
Reviewed-on: https://codeberg.org/vlw/scaffold/pulls/4
I know we just merged #2 and released verison 1.1.0 where the Vegvisir/Reflect crosstalk was supposed to be a class. But after using this briefly, I feel like it gets too verbose. This function will be called _a lot_ and therefore I think it should be pretty quick to type - just like the Vegvisir `VV` class.
Instead of typing
```php
use vlw\Scaffold\Scaffold;
Scaffold::include("some/file.php");
```
we can instead type
```php
use function vlw\Scaffold\load;
load("some/file.php");
```
Reviewed-on: https://codeberg.org/vlw/scaffold/pulls/3
In this PR we move the Vegvisir `VV` class import into Reflect from the API class into its own `Scaffold` class. This new class will include everything that is required for crosstalk between Vegvisir and Reflect.
Reviewed-on: https://codeberg.org/vlw/scaffold/pulls/2