Skip to content

Conversation

@lukinovec
Copy link
Contributor

@lukinovec lukinovec commented Jul 22, 2025

Stop timestamps from getting saved in virtual column

Model timestamps have custom columns. When a model with timestamps gets updated, the timestamps get saved in the virtual column, unless they're specified in getCustomColumns(). This PR adds the default timestamp columns to the default getCustomColumns() method.

Fix tests

In some PHPUnit version (likely 10.x, not properly documented though), the /** @test */ annotations no longer work for marking functions in test files as tests. Instead, the function names either have to start with test (e.g. public function testThatSomethingWorks), or have the #[Test] attribute.

This PR deletes the /** @test */ annotations from the tests and makes the tests use the #[Test] attribute instead.

@lukinovec lukinovec changed the title Fix tests (mark functions as tests using attributes instead of the /** @test */ annotations) Fix tests (mark functions as tests using attributes instead of the /** @test */ annotations), include timestamps in getCustomColumns() by default Jul 22, 2025
@stancl stancl changed the title Fix tests (mark functions as tests using attributes instead of the /** @test */ annotations), include timestamps in getCustomColumns() by default Include timestamps in getCustomColumns() by default, fix tests (use new #[Test] attribute) Jul 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant