connectx/entity-angular-bundle
AppKernel deprecation, PHP 8.x type hints).@NgModule imports).HttpClient calls).@Validated → Angular FormControl rules).interface vs. class preferences.@ApiProperty → @ApiPropertyOptions).@ManyToMany with extra join tables).AppKernel; bundle requires manual Bundle.php registration.null vs. undefined).bin/console) may slow CI/CD if entities change frequently.@Assert constraints map to Angular’s Validators? Manual sync is error-prone.@Component metadata.@Assert → Angular AbstractControl.interface User vs. class User).KernelEvents::PRE_RESPONSE) to:
UserToken).@ApiProperty decorators).// src/EventListener/TSGenerationListener.php
use Symfony\Component\HttpKernel\EventListenerInterface;
use Symfony\Component\HttpKernel\KernelEvents;
class TSGenerationListener implements EventListenerInterface {
public function onKernelRequest() {
// Hook into the bundle’s generation process (if extensible).
}
}
symfony/serializer to dump entities to JSON, then convert to TS via a Node script.| Dependency | Risk Level | Notes |
|---|---|---|
| Symfony 4 | Low | Works as-is; avoid 5+. |
| Doctrine ORM | Medium | Fails if using non-standard mappings (e.g., custom DQL). |
| PHP 5/7/8 | High | PHP 8.x may break type inference in generated TS. |
| Angular 2–14 | Low | Output is basic; manual updates needed for newer Angular features. |
| Composer | Low | Standard require installation. |
dev branch).file_put_contents on generated output).@ApiProperty() for Swagger docs.@Assert to Angular’s Validators via a custom decorator parser.// Auto-generated from Symfony’s @Assert\Length
export function length(min: number, max?: number) {
return (control: AbstractControl) => {
return Validators.compose([
Validators.minLength(min),
max ? Validators.maxLength(max) : null,
])(control);
};
}
@ORM\Column(type="string") to entity fields."tslint/eslint.php bin/console cx:gen:ts && git diff).interface vs. type syntax).@Generated tags).php -d memory_limit=1G).| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Symfony upgrade breaks generation | TS files fail to compile | Fork bundle, test in staging before upgrade. |
| Entity schema changes | TS files become out |
How can I help you explore Laravel packages today?