Content publishing extension to connect stage (Local) and production (Foreign) TYPO3 servers.
TYPO3 Version: 13.4.x (LTS) PHP Version: 8.2 - 8.4 (running: 8.4.8) Extension Version: 13.2.2 (ext_emconf) / 13.3.0 (latest release) Extension Key: in2publish_core Vendor Namespace: In2code\In2publishCore Project Type: Docker Compose + Composer Mode (monorepo) Package Path: packages/in2publish_core/
This is a monorepo for the in2publish Content Publisher suite. The extension connects a Local (staging) TYPO3 instance with a Foreign (production) instance for content publishing.
Key concepts:
- Local: The local/staging TYPO3 instance where editors work
- Foreign: The foreign/live TYPO3 instance that receives published content
- Two separate database connections (
$localDatabase,$foreignDatabase) injected via DI - Adapter pattern for SSH/HTTP/Native communication between instances
Classes/
├── Backend/ # Backend module related
├── Cache/ # Cache implementations
├── Command/ # CLI commands (Local/ and Foreign/ subfolders)
├── CommonInjection/ # Shared DI traits
├── Component/ # Core components (modular architecture)
├── Controller/ # Extbase controllers
├── Event/ # PSR-14 events
├── Factory/ # Factory classes (ConnectionFactory)
├── Features/ # Feature modules (modular architecture)
├── Listener/ # Event listeners
├── Log/ # Logging
├── Middleware/ # PSR-15 middlewares
├── Service/ # Service classes
├── Testing/ # In-app testing framework
├── Utility/ # Utility classes
└── ViewHelpers/ # Fluid ViewHelpers
Configuration/
├── Backend/ # Backend module config
├── Component/ # Component-specific Services.yaml
├── Features/ # Feature-specific Services.yaml
├── TCA/Overrides/ # TCA overrides
├── Yaml/ # YAML config files
├── Services.yaml # Main DI configuration
├── Services.php # PHP-based service config
├── Icons.php # Icon registration
├── JavaScriptModules.php
├── RequestMiddlewares.php
├── ForeignServices.php # Services for Foreign context
└── LocalServices.php # Services for Local context
- Autowiring enabled with autoconfigure
- Two named database connections via factory:
$localDatabase→ConnectionFactory::createLocalConnection()$foreignDatabase→ConnectionFactory::createForeignConnection()
- Cache:
cache.in2publish_core - Modular Services.yaml imports from
Component/*/Services.yamlandFeatures/*/Services.yaml
| Package | Description |
|---|---|
| in2publish_core | Core publishing extension (this package) |
| in2publish | Meta package / distribution |
| in2publish_http | HTTP-based adapter for communication |
| in2publish_local | Native file publishing adapter (no SSH) |
| in2publish_native | SSH adapter using OS SSH/SCP binary |
| in2publish_seclib | SSH adapter using phpseclib |
| in2publish_testing | Scripts and helpers for testing |
| build-essentials | Build tools |
| mysql-loader | MySQL LOAD DATA / SELECT INTO OUTFILE via DBAL |
| process-manager | Parallel processing via Symfony Process |
| stack-test | Testing framework (PHPUnit ^9.6/^10.4/^11.5) |
- Docker Compose config:
.project/docker/docker-compose.darwin.yml(symlinked) - Services: local (httpd), local-php, foreign (httpd), foreign-php, mysql
- Dual TYPO3 instances: Local and Foreign running side-by-side
IN2PUBLISH_CONTEXTenv var distinguishes Local/Foreign
- PHPUnit: Via stack-test package (^9.6/^10.4/^11.5)
- Playwright: Browser tests in
Tests/Playwright/ - Gulp + Sass: Frontend build in
Resources/Private/Build/ - No PHP CS Fixer, PHPStan, or Rector installed
Tests/
├── Browser/ # Browser-based tests
├── Functional/ # Functional tests
├── Helper/ # Test helpers
├── Manual/ # Manual test procedures
├── Playwright/ # Playwright E2E tests
├── Unit/ # Unit tests
├── FunctionalTestCase.php
└── UnitTestCase.php
Key targets:
make install-project- Full project setup (Docker, DB, composer)make start/make stop/make destroy- Docker lifecyclemake composer-install/make composer-update- Composer operationsmake dump-dbs/make restore- Database backup/restoremake typo3-clearcache/make typo3-rebuild-caches- Cache managementmake login-local-php/make login-foreign-php- Shell accessmake setup-qa- QA tools setupmake urls- Show project URLs
- All controller actions MUST return
Psr\Http\Message\ResponseInterface - Use
$this->htmlResponse(),$this->jsonResponse(), or$this->redirectToUri()
- Constructor-based DI only
- Use
#[Autowire]attribute when needed - Configure in Services.yaml (autowire + autoconfigure enabled)
- Use modern TCA types:
number,datetime,email,color,slug,category,folder,file - Removed deprecated
evaloptions
- PSR-14 Events only (legacy hooks removed)
- Register events in
Configuration/Services.yaml
- Use request attributes instead of
$GLOBALS['TSFE'] - Access PageArguments via request:
$request->getAttribute('routing')
- QueryBuilder with named parameters only
- Use
createNamedParameter()for all variables
- Always use
declare(strict_types=1); - Use proper type hints for all parameters and return types
- Use
defined('TYPO3') || die();in config files
- File Management: You may read, create, and modify files without prior consultation.
- Destructive Actions: Always ask for confirmation before performing destructive actions (e.g., deletions or database migrations without a rollback path).
- Testing: Writing and executing tests is always permitted and encouraged.
- Handling Ambiguity: If a requirement is unclear, make a reasonable assumption, document it, and proceed.
- Refactoring: No prior approval is needed for refactoring within a specific module.
- Dependencies: Modifying
composer.jsonor adding/removing dependencies. - Database Schema: Deploying any changes to the database schema.
- External APIs: Calling live external APIs (permitted only within tests using mocks/stubs).
Current Branch: master (main branch: develop)
Recent Commits:
- 92856f62: [RELEASE] Version 13.3.0
- 301b3299: [META] Set the EM conf version number to 13.3.0
- 1acb0fd0: [DOCS] Update Changelog.md
- 86c966b6: [TASK] Merge dependabot pull-request for locutus
- ba1f9acb: Bump locutus from 2.0.32 to 2.0.39
Commit Message Convention: [TYPE] Description where TYPE is RELEASE, META, DOCS, TASK, BUGFIX, FEATURE, TEST