Skip to content

Conversation

@samdark
Copy link
Member

@samdark samdark commented Dec 25, 2025

No description provided.

@samdark samdark changed the title Progress on getting started Getting started Dec 26, 2025
@samdark samdark marked this pull request as ready for review December 26, 2025 22:37
Copilot AI review requested due to automatic review settings December 26, 2025 22:37
@samdark samdark merged commit 863a44f into master Dec 26, 2025
7 checks passed
@samdark samdark deleted the getting-started branch December 26, 2025 22:39
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the "Getting started" guide with improvements to code formatting, documentation paths, and significant enhancements to the database tutorial. The changes span multiple language versions (English, Russian, Indonesian, Spanish) and include translation file updates.

Key Changes

  • Reformatted PHP attribute placement for better readability (moving #[RouteArgument] to separate lines)
  • Fixed documentation links to use correct relative paths
  • Added comprehensive database CRUD tutorial with complete action implementations
  • Improved Docker setup instructions with ownership fix and composer update step
  • Updated HTTP status code examples with detailed explanations
  • Fixed code syntax (added declare(strict_types=1), corrected Reference::to() usage, added sh fence block annotations)

Reviewed changes

Copilot reviewed 53 out of 53 changed files in this pull request and generated 18 comments.

Show a summary per file
File Description
src/guide/start/databases.md Major expansion with complete CRUD implementation, improved migration examples, and HTTP status code table
src/guide/start/creating-project.md Added shell syntax highlighting, fixed Docker instructions with chown command
src/guide/start/forms.md Added strict types declaration
src/guide/runtime/response.md Added HTTP status code comparison table and improved JSON example
src/ru/guide/start/databases.md Translation update (has inconsistencies with English version)
src/id/guide/start/databases.md Translation update (has inconsistencies with English version)
src/es/guide/start/databases.md Translation update (has inconsistencies with English version)
src/*/guide/views/view.md Improved attribute formatting across all languages
src/*/guide/views/template-engines.md Fixed renderer configuration and Markdown capitalization across all languages
src/*/guide/start/hello.md Improved attribute formatting across all languages
src/*/guide/start/creating-project.md Fixed documentation paths and Docker instructions across all languages
_translations/pot/* Updated translation templates with new content
_translations/po/* Updated translation files for all languages

<?= Html::a('Edit', $urlGenerator->generate('page/edit', ['slug' => $page->getSlug()])) ?> |
<?php
Copy link

Copilot AI Dec 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing RouteArgument attribute on the $slug parameter. The English version at src/guide/start/databases.md:530-531 includes the #[RouteArgument('slug')] attribute on the parameter. Without this attribute, the routing system won't properly bind the URL parameter to this method argument.

Copilot uses AI. Check for mistakes.
{
return $this->viewRenderer->render(__DIR__ . '/list', [
'pages' => $this->pageRepository->findAll(),
]);
Copy link

Copilot AI Dec 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect variable reference in template. The template uses $this->urlGenerator but the UrlGeneratorInterface variable should be accessed as $urlGenerator (without $this->). The English version at src/guide/start/databases.md:411 documents $urlGenerator as a template variable and uses it correctly at line 417. The view should either have this variable passed from the action or document it as an available view context variable.

Copilot uses AI. Check for mistakes.
{
return $this->viewRenderer->render(__DIR__ . '/list', [
'pages' => $this->pageRepository->findAll(),
]);
Copy link

Copilot AI Dec 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect variable reference in template. The template uses $this->urlGenerator but the UrlGeneratorInterface variable should be accessed as $urlGenerator (without $this->). The English version at src/guide/start/databases.md:411 documents $urlGenerator as a template variable and uses it correctly at line 417. The view should either have this variable passed from the action or document it as an available view context variable.

Copilot uses AI. Check for mistakes.
namespace App\Web\Page;
use Psr\Http\Message\ResponseFactoryInterface;
Copy link

Copilot AI Dec 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Page entity no longer has an isDeleted() method. In the English version of this file, the deletedAt field was removed from the Page entity, and the check here was simplified to only check if the page is null. This condition should be: if ($page === null) to match the English version at src/guide/start/databases.md:455.

Copilot uses AI. Check for mistakes.
namespace App\Web\Page;
use Psr\Http\Message\ResponseFactoryInterface;
Copy link

Copilot AI Dec 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Page entity no longer has an isDeleted() method. In the English version of this file, the deletedAt field was removed from the Page entity, and the check here was simplified to only check if the page is null. This condition should be: if ($page === null) to match the English version at src/guide/start/databases.md:455.

Copilot uses AI. Check for mistakes.
<?= Html::a('Edit', $urlGenerator->generate('page/edit', ['slug' => $page->getSlug()])) ?> |
<?php
Copy link

Copilot AI Dec 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing RouteArgument attribute on the $slug parameter. The English version at src/guide/start/databases.md:530-531 includes the #[RouteArgument('slug')] attribute on the parameter. Without this attribute, the routing system won't properly bind the URL parameter to this method argument.

Copilot uses AI. Check for mistakes.
<?= Html::a('Edit', $urlGenerator->generate('page/edit', ['slug' => $page->getSlug()])) ?> |
<?php
Copy link

Copilot AI Dec 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing RouteArgument attribute on the $slug parameter. The English version at src/guide/start/databases.md:530-531 includes the #[RouteArgument('slug')] attribute on the parameter. Without this attribute, the routing system won't properly bind the URL parameter to this method argument.

Copilot uses AI. Check for mistakes.
{
return $this->viewRenderer->render(__DIR__ . '/list', [
'pages' => $this->pageRepository->findAll(),
]);
Copy link

Copilot AI Dec 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect property access. The code uses $page->slug but the Page entity doesn't have a public slug property. Instead, use the $page->getSlug() method which generates the slug from the title. The English version at src/guide/start/databases.md:417 correctly calls $page->getSlug().

Copilot uses AI. Check for mistakes.
{
return $this->viewRenderer->render(__DIR__ . '/list', [
'pages' => $this->pageRepository->findAll(),
]);
Copy link

Copilot AI Dec 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect property access. The code uses $page->slug but the Page entity doesn't have a public slug property. Instead, use the $page->getSlug() method which generates the slug from the title. The English version at src/guide/start/databases.md:417 correctly calls $page->getSlug().

Copilot uses AI. Check for mistakes.
<?= Html::a('Create', $urlGenerator->generate('page/edit', ['slug' => 'new'])) ?>
```

### View a page
Copy link

Copilot AI Dec 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing trailing comma after the last constructor parameter. The English version at src/guide/start/databases.md:447 includes a trailing comma. For consistency and to match PHP best practices (especially with readonly properties), add a comma after $responseFactory.

Copilot uses AI. Check for mistakes.
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.

2 participants