Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 922623
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T19:03:47+00:00 2026-05-15T19:03:47+00:00

I have a library Google that I keep in a separate GIT repository. This

  • 0

I have a library “Google” that I keep in a separate GIT repository.

This library is used in some projects. The problem is that I want to rename the library to match the naming convention of these projects, e.g. “Service_Google”.

Since PHP doesn’t allow for automagic refactoring, the best way I’ve come up with is to do the following.

  1. Clone the repo
  2. Use regex search and replace to change every class name and reference
  3. [use it until there’s a new version]
  4. Revert
  5. Pull the latest version
  6. Step 2

There must be a better way, right?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T19:03:47+00:00Added an answer on May 15, 2026 at 7:03 pm

    I would work very hard to avoid changing an external library in any way. Even apparently benign changes such as name changes can be fraught with danger. The sheer hassle of needing to make those changes every time you take a new version is to me unacceptable.

    I would also say that the motivation of bending Google’s stuff to conform to your naming convention is rather suspect. Should we take this further? Colour for Color? Oui for Yes if we’re working in France? (I mean in variable names and function names not in presentation.)

    I would even avoid using class_alias for this purpose. You give a new developer, who happens already to be familiar with the external library, a headache.

    Bottom line: there are times to go with the flow, embrace the library that you are using, control the things you own.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using EasyTracker google analytics library and my app have multiple activities. I want
I have enabled google Minify in code igniter using this library on our website.
I have a package that requires Google Map library. And I implemented it like
does google charts have a library for software development that does not require internet
I have a library consisting of some 300 c++ files. The program that consumes
I'm writing a program that uses oauth2 library of google for some app in
I have a library made in C++/GDI that I am trying to port to
I have a library project that should be the base for several web applications.
I have a library written in C++, and a wrapper for this library written
I have a library that interacts with our phone system, ie, Hey phone, call

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.