Release 2.35 (#5470)

* open up API for plugins by removing internal
* use constants in entity column definition
* simplified entity management API
* bump packages
* allow installing assets and run database migrations independently
* bump to apidoc-bundle 5
* do not duplicate http method in API operationId
* new security entries in Open API definition
* changed API UI provider for Swagger to Stoplight, improved endpoint titles, hide internal endpoints
* deactivate swagger json endpoint
This commit is contained in:
Kevin Papst
2025-05-24 14:28:39 +02:00
committed by GitHub
parent 6e26a37c4d
commit 1e0fbf0b73
63 changed files with 518 additions and 529 deletions

View File

@@ -46,7 +46,7 @@ final class ProjectDuplicationService
$newProject->setEnd(null);
}
$this->projectService->saveNewProject($newProject);
$this->projectService->saveProject($newProject);
foreach ($this->projectRateRepository->getRatesForProject($project) as $rate) {
$newRate = clone $rate;

View File

@@ -56,6 +56,18 @@ final class ProjectService
return $project;
}
public function saveProject(Project $project, ?Context $context = null): Project
{
if ($project->isNew()) {
return $this->saveNewProject($project, $context); // @phpstan-ignore method.deprecated
} else {
return $this->updateProject($project); // @phpstan-ignore method.deprecated
}
}
/**
* @deprecated since 2.35 - use saveProject() instead
*/
public function saveNewProject(Project $project, ?Context $context = null): Project
{
if (null !== $project->getId()) {
@@ -97,6 +109,9 @@ final class ProjectService
}
}
/**
* @deprecated since 2.35 - use saveProject() instead
*/
public function updateProject(Project $project): Project
{
$this->validateProject($project);
@@ -108,8 +123,12 @@ final class ProjectService
return $project;
}
public function findProjectByName(string $name): ?Project
public function findProjectByName(string $name, ?Customer $customer): ?Project
{
if ($customer !== null) {
return $this->repository->findOneBy(['name' => $name, 'customer' => $customer->getId()]);
}
return $this->repository->findOneBy(['name' => $name]);
}