承接 samuelvi/spreadsheet-translator-provider-localfile 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

samuelvi/spreadsheet-translator-provider-localfile

最新稳定版本:v8.4.0

Composer 安装命令:

composer require samuelvi/spreadsheet-translator-provider-localfile

包简介

Spreadsheet Translator - Library that handles a local spreadsheet file

README 文档

README

This package provides a Spreadsheet Translator provider that reads spreadsheet documents from the local filesystem (local disks, mounted drives, or shared resources). It copies the configured source file to a temporary local path and returns a Resource object that the core library can consume.
The project now targets PHP 8.4 and includes a PHPUnit test suite and Makefile-powered workflows.

Features

  • Safely copies the source spreadsheet to a local temporary file before processing.
  • Keeps the provider’s output format configurable while defaulting to xlsx.
  • Fully compatible with PHP 8.4 and the samuelvi/spreadsheet-translator-core ^8.4 series.
  • Ships with PHPUnit coverage to prevent regressions in file handling.

Requirements

  • PHP >= 8.4
  • Composer 2
  • Filesystem access to both the source file and the configured temporary directory

Installation

composer require samuelvi/spreadsheet-translator-provider-localfile

Usage

<?php

use Atico\SpreadsheetTranslator\Core\Configuration\Configuration;
use Atico\SpreadsheetTranslator\Provider\LocalFile\LocalFileProvider;

$configuration = new Configuration([
    'providers' => [
        'local_file' => [
            'source_resource' => '/srv/shared/source.xlsx',
            'temp_local_source_file' => sys_get_temp_dir() . '/sheet-copy.xlsx',
            'format' => 'csv',
        ],
    ],
], 'local_file');

$provider = new LocalFileProvider($configuration);
$resource = $provider->handleSourceResource();

printf(
    'Copied "%s" with format "%s"%s',
    $resource->getValue(),
    $resource->getFormat(),
    PHP_EOL
);

Testing & Tooling

  • composer install – install dependencies (PHP 8.4 runtime required).
  • composer test / ./vendor/bin/phpunit – run the PHPUnit 11 suite.
  • make test – execute the same PHPUnit suite via the Makefile.
  • make check – install dependencies and run tests in one step.
  • make rector – apply Rector rules defined in rector.php.
  • make clean – remove local build caches such as .phpunit.cache.

Related

Contributing

We welcome contributions to this project, including pull requests and issues (and discussions on existing issues).

If you'd like to contribute code but aren't sure what, the issues list is a good place to start. If you're a first-time code contributor, you may find Github's guide to forking projects helpful.

All contributors (whether contributing code, involved in issue discussions, or involved in any other way) must abide by our code of conduct.

License

Spreadsheet Translator Symfony Bundle is licensed under the MIT License. See the LICENSE file for full details.

统计信息

  • 总下载量: 12
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-10-12

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固