Skip to main content

Composer Installation

This guide covers installing the Magento FreeAgent Integration connector via Composer using a Private Packagist repository.

Prerequisites

Before installing, ensure you have:

  • Magento 2.4.4+ installed and running
  • PHP 8.1+ (8.2, 8.3, 8.4, 8.5 supported)
  • Composer 2.x installed
  • SSH/CLI access to your Magento server
  • Valid license from Byte8 Ltd

Installation Steps

1. Add Composer Repository

After purchasing the extension, you'll receive access to a Private Packagist repository. Add it to your project:

composer config repositories.private-packagist composer https://byte8.repo.packagist.com/your-repository-name/

2. Setup Authentication

Configure authentication for the private repository. You have several options:

composer config --global --auth http-basic.byte8.repo.packagist.com token your-access-token

Option B: Project Auth File

Create or edit auth.json in your Magento root directory:

{
"http-basic": {
"byte8.repo.packagist.com": {
"username": "token",
"password": "your-access-token"
}
}
}

Option C: Environment Variables

export COMPOSER_AUTH='{"http-basic":{"byte8.repo.packagist.com":{"username":"token","password":"your-access-token"}}}'

3. Install the Extension

Install the metapackage which includes all required modules:

composer require byte8/magento-freeagent-suite

This installs the following modules:

PackageDescription
byte8/module-coreCore framework and utilities
byte8/module-profileProfile management system
byte8/module-profile-notificationProfile notification system
byte8/module-freeagent-coreFreeAgent API client and authentication
byte8/module-freeagent-contactContact synchronization
byte8/module-freeagent-invoiceInvoice synchronization
byte8/module-freeagent-creditmemoCredit memo synchronization

4. Post-Installation Setup

Run the following Magento setup commands:

# Enable all new modules
bin/magento module:enable --all

# Run database schema upgrades
bin/magento setup:upgrade

# Compile dependency injection
bin/magento setup:di:compile

# Deploy static content (production mode only)
bin/magento setup:static-content:deploy

# Flush all caches
bin/magento cache:flush
Production Mode

If running in production mode, make sure to run setup:static-content:deploy with the appropriate locales:

bin/magento setup:static-content:deploy en_US en_GB de_DE

5. Verify Installation

Confirm the modules are installed and enabled:

bin/magento module:status | grep -i byte8

Expected output:

Byte8_Core
Byte8_Profile
Byte8_ProfileNotification
Byte8_FreeAgentCore
Byte8_FreeAgentContact
Byte8_FreeAgentInvoice
Byte8_FreeAgentCreditmemo

Version Compatibility

Magento VersionPHP VersionMagento FreeAgent Integration
2.4.4 - 2.4.88.1 - 8.51.x

Troubleshooting

Authentication Errors

[Composer\Downloader\TransportException]
The "https://byte8.repo.packagist.com/..." URL required authentication.

Solution: Verify your auth token is correctly configured:

composer config --global --list | grep byte8

Memory Limit Errors

PHP Fatal error: Allowed memory size of ... bytes exhausted

Solution: Increase PHP memory limit:

php -d memory_limit=4G $(which composer) require byte8/magento-freeagent-suite

Dependency Conflicts

If you encounter dependency conflicts with other extensions:

# Check what's conflicting
composer why-not byte8/magento-freeagent-suite

# Try updating dependencies
composer update --with-all-dependencies

Next Steps

After installation, proceed to configure the connector:

  1. Client Configuration - Set up FreeAgent API connection
  2. Profile Configuration - Configure sync settings
  3. About Profiles - Understand profile system